Given $$$n$$$ and sequences $$$l_1, l_2, \ldots l_n$$$ and $$$r_1, r_2, \ldots r_n$$$.
Let's call a sequence of non-negative numbers $$$a_1, a_2, \ldots a_n$$$ good if $$$l_i \le a_i \le r_i$$$ and $$$a_1 \oplus a_2 \oplus \ldots \oplus a_n = 0$$$.
Find the number of different good sequences (modulo $$$998\,244\,353$$$, obviously).
The first line contains one integer $$$n$$$ $$$(1 \le n \le 30)$$$ — length of the sequence.
The next $$$n$$$ lines contain two integers $$$l_i, r_i$$$ ($$$0 \le l_i \le r_i \le 2^{60} - 1$$$) — elements of the sequence.
Print the answer.
21 10050 150
51
53 938354 916557 932778 991411 998
35553823
$$$a \oplus b$$$ is a well-known bitwise operation called XOR. For example, $$$5 \oplus 7 = 2$$$, $$$1 \oplus 2 = 3$$$, $$$6 \oplus 3 = 5$$$.
| Name |
|---|


