apaz/codeforces-genesys huggingface dataset:
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in c++17.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```cpp
<your code here>
```

Execution time limit: 1.0 seconds
Memory limit: 256.0 MB

# Problem
There are $$$2n$$$ positive integers written on a whiteboard. Being bored, you decided to play a one-player game with the numbers on the whiteboard.

You start with a score of $$$0$$$. You will increase your score by performing the following move exactly $$$n$$$ times:

- Choose two integers $$$x$$$ and $$$y$$$ that are written on the whiteboard.
- Add $$$\min(x,y)$$$ to your score.
- Erase $$$x$$$ and $$$y$$$ from the whiteboard.

Note that after performing the move $$$n$$$ times, there will be no more integers written on the whiteboard.

Find the maximum final score you can achieve if you optimally perform the $$$n$$$ moves.

## Input Format
Each test contains multiple test cases. The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 5000$$$) — the number of test cases. The description of the test cases follows.

The first line of each test case contains a single integer $$$n$$$ ($$$1 \leq n \leq 50$$$) — the number of integers written on the whiteboard is $$$2n$$$.

The second line of each test case contains $$$2n$$$ integers $$$a_1,a_2,\ldots,a_{2n}$$$ ($$$1 \leq a_i \leq 10^7$$$) — the numbers written on the whiteboard.

## Output Format
For each test case, output the maximum final score that you can achieve.

## Examples
```input
3
1
2 3
2
1 1 2 1
3
1 1 1 1 1 1
```
```output
2
2
3
```

## Note
In the first test case, you can only make one move. You select $$$x=2$$$ and $$$y=3$$$, and your score will be $$$\min(x,y)=2$$$.

In the second test case, the following is a sequence of moves that achieves a final score of $$$2$$$:

- In the first move, select $$$x=1$$$ and $$$y=1$$$. Then, add $$$\min(x,y)=1$$$ to the score. After erasing $$$x$$$ and $$$y$$$, the integers left on the whiteboard are $$$1$$$ and $$$2$$$.
- In the second move, select $$$x=1$$$ and $$$y=2$$$. Then, add $$$\min(x,y)=1$$$ to the score. After removing $$$x$$$ and $$$y$$$, no more integers will be left on the whiteboard.

In the third test case, you will perform the move thrice, adding $$$1$$$ to the score each time.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in c++17.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```cpp
<your code here>
```

Execution time limit: 3.0 seconds
Memory limit: 256.0 MB

# Problem
Stack has an array $$$a$$$ of length $$$n$$$ such that $$$a_i = i$$$ for all $$$i$$$ ($$$1 \leq i \leq n$$$). He will select a positive integer $$$k$$$ ($$$1 \leq k \leq \lfloor \frac{n-1}{2} \rfloor$$$) and do the following operation on $$$a$$$ any number (possibly $$$0$$$) of times.

- Select a subsequence$$$^\dagger$$$ $$$s$$$ of length $$$2 \cdot k + 1$$$ from $$$a$$$. Now, he will delete the first $$$k$$$ elements of $$$s$$$ from $$$a$$$. To keep things perfectly balanced (as all things should be), he will also delete the last $$$k$$$ elements of $$$s$$$ from $$$a$$$.

Stack wonders how many arrays $$$a$$$ can he end up with for each $$$k$$$ ($$$1 \leq k \leq \lfloor \frac{n-1}{2} \rfloor$$$). As Stack is weak at counting problems, he needs your help.

Since the number of arrays might be too large, please print it modulo $$$998\,244\,353$$$.

$$$^\dagger$$$ A sequence $$$x$$$ is a subsequence of a sequence $$$y$$$ if $$$x$$$ can be obtained from $$$y$$$ by deleting several (possibly, zero or all) elements. For example, $$$[1, 3]$$$, $$$[1, 2, 3]$$$ and $$$[2, 3]$$$ are subsequences of $$$[1, 2, 3]$$$. On the other hand, $$$[3, 1]$$$ and $$$[2, 1, 3]$$$ are not subsequences of $$$[1, 2, 3]$$$.

## Input Format
Each test contains multiple test cases. The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 2 \cdot 10^3$$$) — the number of test cases. The description of the test cases follows.

The first line of each test case contains a single integer $$$n$$$ ($$$3 \leq n \leq 10^6$$$) — the length of the array $$$a$$$.

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$10^6$$$.

## Output Format
For each test, on a new line, print $$$\lfloor \frac{n-1}{2} \rfloor$$$ space-separated integers — the $$$i$$$-th integer representing the number of arrays modulo $$$998\,244\,353$$$ that Stack can get if he selects $$$k=i$$$.

## Examples
```input
4
3
4
5
10
```
```output
2 
4 
10 2 
487 162 85 10
```

## Note
In the first test case, two $$$a$$$ are possible for $$$k=1$$$:

- $$$[1,2,3]$$$;
- $$$[2]$$$.

In the second test case, four $$$a$$$ are possible for $$$k=1$$$:

- $$$[1,2,3,4]$$$;
- $$$[1,3]$$$;
- $$$[2,3]$$$;
- $$$[2,4]$$$.

In the third test case, two $$$a$$$ are possible for $$$k=2$$$:

- $$$[1,2,3,4,5]$$$;
- $$$[3]$$$.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in c++17.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```cpp
<your code here>
```

Execution time limit: 3.0 seconds
Memory limit: 256.0 MB

# Problem
For an array $$$b$$$ of $$$m$$$ non-negative integers, define $$$f(b)$$$ as the maximum value of $$$\max\limits_{i = 1}^{m} (b_i | x) - \min\limits_{i = 1}^{m} (b_i | x)$$$ over all possible non-negative integers $$$x$$$, where $$$|$$$ is bitwise OR operation.

You are given integers $$$n$$$ and $$$q$$$. You start with an empty array $$$a$$$. Process the following $$$q$$$ queries:

- $$$v$$$: append $$$v$$$ to the back of $$$a$$$ and then output $$$f(a)$$$. It is guaranteed that $$$0 \leq v < n$$$.

The queries are given in a modified way.

## Input Format
Each test contains multiple test cases. The first line contains a single integer $$$t$$$ ($$$1 \leq t \leq 2 \cdot 10^5$$$) — the number of test cases. The description of the test cases follows.

The first line of each test case contains two integers $$$n$$$ and $$$q$$$ ($$$1 \leq n \leq 2^{22}$$$, $$$1 \leq q \leq 10^6$$$) — the number of queries.

The second line of each test case contains $$$q$$$ space-separated integers $$$e_1,e_2,\ldots,e_q$$$ ($$$0 \leq e_i < n$$$) — the encrypted values of $$$v$$$.

Let $$$\mathrm{last}_i$$$ equal the output of the $$$(i-1)$$$-th query for $$$i\geq 2$$$ and $$$\mathrm{last}_i=0$$$ for $$$i=1$$$. Then the value of $$$v$$$ for the $$$i$$$-th query is ($$$e_i + \mathrm{last}_i$$$) modulo $$$n$$$.

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2^{22}$$$ and the sum of $$$q$$$ over all test cases does not exceed $$$10^6$$$.

## Output Format
For each test case, print $$$q$$$ integers. The $$$i$$$-th integer is the output of the $$$i$$$-th query.

## Examples
```input
2
5 2
1 2
7 4
3 1 5 2
```
```output
0 2
0 2 3 5
```

## Note
In the first test case, the final $$$a=[1,2]$$$. For $$$i=1$$$, the answer is always $$$0$$$, irrespective of $$$x$$$. For $$$i=2$$$, we can select $$$x=5$$$.

In the second test case, the final $$$a=[3,1,0,5]$$$.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in c++17.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```cpp
<your code here>
```

Execution time limit: 3.0 seconds
Memory limit: 256.0 MB

# Problem
You are given a binary$$$^\dagger$$$ pattern $$$p$$$ of length $$$n$$$.

A binary string $$$q$$$ of the same length $$$n$$$ is called good if for every $$$i$$$ ($$$1 \leq i \leq n$$$), there exist indices $$$l$$$ and $$$r$$$ such that:

- $$$1 \leq l \leq i \leq r \leq n$$$, and
- $$$p_i$$$ is a mode$$$^\ddagger$$$ of the string $$$q_lq_{l+1}\ldots q_r$$$.

Count the number of good binary strings modulo $$$998\,244\,353$$$.

$$$^\dagger$$$ A binary string is a string that only consists of characters $$$\mathtt{0}$$$ and $$$\mathtt{1}$$$.

$$$^\ddagger$$$ Character $$$c$$$ is a mode of string $$$t$$$ of length $$$m$$$ if the number of occurrences of $$$c$$$ in $$$t$$$ is at least $$$\lceil \frac{m}{2} \rceil$$$. For example, $$$\mathtt{0}$$$ is a mode of $$$\mathtt{010}$$$, $$$\mathtt{1}$$$ is not a mode of $$$\mathtt{010}$$$, and both $$$\mathtt{0}$$$ and $$$\mathtt{1}$$$ are modes of $$$\mathtt{011010}$$$.

## Input Format
The first line of input contains a single integer $$$n$$$ ($$$1 \le n \le 10^5$$$) — the length of the binary string $$$p$$$.

The second line of input contains a binary string $$$p$$$ of length $$$n$$$ consisting of characters 0 and 1.

## Output Format
Output the number of good strings modulo $$$998\,244\,353$$$.

## Examples
```input
1
0
```
```output
1
```
-----
```input
3
111
```
```output
5
```
-----
```input
4
1011
```
```output
9
```
-----
```input
6
110001
```
```output
36
```
-----
```input
12
111010001111
```
```output
2441
```

## Note
In the second example, the good strings are

- $$$\mathtt{010}$$$;
- $$$\mathtt{011}$$$;
- $$$\mathtt{101}$$$;
- $$$\mathtt{110}$$$;
- $$$\mathtt{111}$$$.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in c++17.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```cpp
<your code here>
```

Execution time limit: 2.0 seconds
Memory limit: 256.0 MB

# Problem
Yarik's birthday is coming soon, and Mark decided to give him an array $$$a$$$ of length $$$n$$$.

Mark knows that Yarik loves bitwise operations very much, and he also has a favorite number $$$x$$$, so Mark wants to find the maximum number $$$k$$$ such that it is possible to select pairs of numbers [$$$l_1, r_1$$$], [$$$l_2, r_2$$$], $$$\ldots$$$ [$$$l_k, r_k$$$], such that:

- $$$l_1 = 1$$$.
- $$$r_k = n$$$.
- $$$l_i \le r_i$$$ for all $$$i$$$ from $$$1$$$ to $$$k$$$.
- $$$r_i + 1 = l_{i + 1}$$$ for all $$$i$$$ from $$$1$$$ to $$$k - 1$$$.
- $$$(a_{l_1} \oplus a_{l_1 + 1} \oplus \ldots \oplus a_{r_1}) | (a_{l_2} \oplus a_{l_2 + 1} \oplus \ldots \oplus a_{r_2}) | \ldots | (a_{l_k} \oplus a_{l_k + 1} \oplus \ldots \oplus a_{r_k}) \le x$$$, where $$$\oplus$$$ denotes the operation of bitwise XOR, and $$$|$$$ denotes the operation of bitwise OR.

If such $$$k$$$ does not exist, then output $$$-1$$$.

## Input Format
Each test consists of multiple test cases. The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. The following lines contain the descriptions of the test cases.

The first line of each test case contains two integers $$$n$$$ and $$$x$$$ ($$$1 \le n \le 10^5, 0 \le x < 2^{30}$$$) — the length of the array $$$a$$$ and the number $$$x$$$ respectively.

The second line of each test case contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$0 \le a_i < 2^{30}$$$) — the array $$$a$$$ itself.

It is guaranteed that the sum of the values of $$$n$$$ across all test cases does not exceed $$$10^5$$$.

## Output Format
For each test case, output a single integer on a separate line — the maximum suitable number $$$k$$$, and $$$-1$$$ if such $$$k$$$ does not exist.

## Examples
```input
8
3 1
1 2 3
2 2
1 1
2 2
1 3
2 3
0 0
3 2
0 0 1
4 2
1 3 3 7
2 2
2 3
5 0
0 1 2 2 1
```
```output
2
2
1
2
3
-1
1
2
```

## Note
In the first test case, you can take $$$k$$$ equal to $$$2$$$ and choose two segments [$$$1, 1$$$] and [$$$2, 3$$$], $$$(1) | (2 \oplus 3) = 1$$$. It can be shown that $$$2$$$ is the maximum possible answer.

In the second test case, the segments [$$$1, 1$$$] and [$$$2, 2$$$] are suitable, $$$(1) | (1) = 1$$$. It is not possible to make more segments.

In the third test case, it is not possible to choose $$$2$$$ segments, as $$$(1) | (3) = 3 > 2$$$, so the optimal answer is $$$1$$$.

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in c++17.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```cpp
<your code here>
```

Execution time limit: 2.0 seconds
Memory limit: 256.0 MB

# Problem
Some permutation of length $$$n$$$ is guessed.

You are given the indices of its prefix maximums and suffix maximums.

Recall that a permutation of length $$$k$$$ is an array of size $$$k$$$ such that each integer from $$$1$$$ to $$$k$$$ occurs exactly once.

Prefix maximums are the elements that are the maximum on the prefix ending at that element. More formally, the element $$$a_i$$$ is a prefix maximum if $$$a_i > a_j$$$ for every $$$j < i$$$.

Similarly, suffix maximums are defined, the element $$$a_i$$$ is a suffix maximum if $$$a_i > a_j$$$ for every $$$j > i$$$.

You need to output the number of different permutations that could have been guessed.

As this number can be very large, output the answer modulo $$$10^9 + 7$$$.

## Input Format
Each test consists of several test cases. The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of test cases. Then follows the description of the test cases.

The first line of each test case contains three integers $$$n, m_1$$$ and $$$m_2$$$ ($$$1 \le m_1, m_2 \le n \le 2 \cdot 10^5$$$) — the length of the permutation, the number of prefix maximums, and the number of suffix maximums, respectively.

The second line of each test case contains $$$m_1$$$ integers $$$p_1 < p_2 < \ldots < p_{m_1}$$$ ($$$1 \le p_i \le n$$$) — the indices of the prefix maximums in increasing order.

The third line of each test case contains $$$m_2$$$ integers $$$s_1 < s_2 < \ldots < s_{m_2}$$$ ($$$1 \le s_i \le n$$$) — the indices of the suffix maximums in increasing order.

It is guaranteed that the sum of the values of $$$n$$$ for all test cases does not exceed $$$2 \cdot 10^5$$$.

## Output Format
For each test case, output a single integer on a separate line — the number of suitable permutations modulo $$$10^9 + 7$$$.

## Examples
```input
6
1 1 1
1
1
4 2 3
1 2
2 3 4
3 3 1
1 2 3
3
5 3 4
1 2 3
2 3 4 5
20 5 4
1 2 3 4 12
12 13 18 20
6 2 3
1 3
3 4 6
```
```output
1
3
1
0
317580808
10
```

## Note
The following permutations are suitable for the second set of input data:

- $$$[1, 4, 3, 2]$$$
- $$$[2, 4, 3, 1]$$$
- $$$[3, 4, 2, 1]$$$

The following permutations are suitable for the sixth set of input data:

- $$$[2, 1, 6, 5, 3, 4]$$$
- $$$[3, 1, 6, 5, 2, 4]$$$
- $$$[3, 2, 6, 5, 1, 4]$$$
- $$$[4, 1, 6, 5, 2, 3]$$$
- $$$[4, 2, 6, 5, 1, 3]$$$
- $$$[4, 3, 6, 5, 1, 2]$$$
- $$$[5, 1, 6, 4, 2, 3]$$$
- $$$[5, 2, 6, 4, 1, 3]$$$
- $$$[5, 3, 6, 4, 1, 2]$$$
- $$$[5, 4, 6, 3, 1, 2]$$$

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in c++17.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```cpp
<your code here>
```

Execution time limit: 6.0 seconds
Memory limit: 512.0 MB

# Problem
Oleg received a permutation $$$a$$$ of length $$$n$$$ as a birthday present.

Oleg's friend Nechipor asks Oleg $$$q$$$ questions, each question is characterized by two numbers $$$l$$$ and $$$r$$$, in response to the question Oleg must say the number of sets of indices $$$(t_1, t_2, \ldots, t_k)$$$ of any length $$$k \ge 1$$$ such that:

- $$$l \le t_i \le r$$$ for each $$$i$$$ from $$$1$$$ to $$$k$$$.
- $$$t_i < t_{i+1}$$$ for each $$$i$$$ from $$$1$$$ to $$$k-1$$$.
- $$$a_{t_{i+1}}$$$ is divisible by $$$a_{t_i}$$$ for each $$$i$$$ from $$$1$$$ to $$$k-1$$$.

Help Oleg and answer all of Nechipor's questions.

## Input Format
Each test consists of several sets of input data. The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — the number of sets of input data. The description of the sets of input data follows.

The first line of each set of input data contains two integers $$$n$$$ and $$$q$$$ ($$$1 \le n, q \le 10^6$$$) — the length of the permutation and the number of Nechipor's questions.

The second line of each set of input data contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ ($$$1 \le a_i \le n$$$) — the permutation $$$a$$$ itself.

In each of the next $$$q$$$ lines of each set of input data, there are two integers $$$l$$$ and $$$r$$$ ($$$1 \le l \le r \le n$$$) — the next question of Nechipor.

It is guaranteed that the sum of the values of $$$n$$$ and the sum of the values of $$$q$$$ over all test cases does not exceed $$$10^6$$$.

## Output Format
For each set of input data, output the answers to all of Nechipor's questions.

## Examples
```input
4
8 8
2 1 6 3 5 4 8 7
1 8
2 8
1 7
1 6
1 3
5 8
4 4
2 3
1 1
1
1 1
3 3
3 2 1
1 2
1 3
2 3
8 1
1 2 3 4 5 6 7 8
1 8
```
```output
20 15 18 12 5 5 1 3
1
2 3 2
27
```

## Note
All suitable arrays in the first set of input data: ($$$1$$$), ($$$2$$$), ($$$3$$$), ($$$4$$$), ($$$5$$$), ($$$6$$$), ($$$7$$$), ($$$8$$$), ($$$1, 3$$$), ($$$1, 6$$$), ($$$1, 7$$$), ($$$1, 6, 7$$$), ($$$2, 3$$$), ($$$2, 4$$$), ($$$2, 5$$$), ($$$2, 6$$$), ($$$2, 7$$$), ($$$2, 8$$$), ($$$2, 6, 7$$$), ($$$6, 7$$$).

All suitable arrays in the fourth set of input data: ($$$1$$$), ($$$2$$$), ($$$3$$$), ($$$4$$$), ($$$5$$$), ($$$6$$$), ($$$7$$$), ($$$8$$$), ($$$1, 2$$$), ($$$1, 3$$$), ($$$1, 4$$$), ($$$1, 5$$$), ($$$1, 6$$$), ($$$1, 7$$$), ($$$1, 8$$$), ($$$1, 2, 4$$$), ($$$1, 2, 6$$$), ($$$1, 2, 8$$$), ($$$1, 2, 4, 8$$$), ($$$1, 3, 6$$$), ($$$1, 4, 8$$$), ($$$2, 4$$$), ($$$2, 6$$$), ($$$2, 8$$$), ($$$2, 4, 8$$$), ($$$3, 6$$$), ($$$4, 8$$$).

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in c++17.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```cpp
<your code here>
```

Execution time limit: 1.0 seconds
Memory limit: 256.0 MB

# Problem
A mathematician grabbed my computer as I was preparing this problem, deleted the statement, and changed the samples to fit his liking. The model solution and input/output format are still correct, but the samples are wrong.

I've partially fixed the problem so that when you submit, it will be tested against the correct version of the problem. However, I can't fix the samples below. As a computer scientist, can you solve the correct problem?

## Input Format
The only line of input contains a real number $$$x$$$ ($$$1 \leq x \leq 100$$$), given to exactly three decimal places.

## Output Format
Output one real number — the answer. Your answer is considered correct if its absolute or relative error does not exceed $$$10^{-4}$$$. Formally, let your answer be $$$a$$$, and the jury's answer be $$$b$$$. Your answer is accepted if and only if $$$\frac{|a-b|}{\max(1,|b|)} \le 10^{-4}$$$.

## Examples
```input
1.234
```
```output
0.21026
```
-----
```input
4.113
```
```output
1.41415
```
-----
```input
99.000
```
```output
4.59512
```

Now solve the problem and return the code.
You are an expert competitive programmer. You will be given a problem statement, test case constraints and example test inputs and outputs. Please reason step by step about the solution (that must respect memory and time limits), then provide a complete implementation in c++17.

Your solution must read input from standard input (cin), write output to standard output (cout).
Do not include any debug prints or additional output.

Put your final solution within a single code block:
```cpp
<your code here>
```

Execution time limit: 1.0 seconds
Memory limit: 256.0 MB

# Problem
The little boy Nikita was given some cubes as a present. He decided to build a tower out of them.

Initially, the tower doesn't have any cubes. In one move, Nikita either puts exactly $$$1$$$ cube on top of the tower or removes exactly $$$1$$$ cube from the top of the tower. Is it possible that after $$$n$$$ moves, the resulting tower has exactly $$$m$$$ cubes?

## Input Format
Each test contains multiple test cases. The first line of input contains a single integer $$$t$$$ ($$$1 \le t \le 100$$$) — the number of test cases. The description of the test cases follows.

The only line of each test case contains two integers $$$n$$$ and $$$m$$$ ($$$1 \le n, m \le 100$$$).

## Output Format
For each test case, output "Yes" (without quotes) if Nikita can obtain a tower with $$$m$$$ cubes, and "No" (without quotes) otherwise.

You can output each letter in any case (lowercase or uppercase). For example, the strings "yEs", "yes", "Yes", and "YES" will be accepted as a positive answer.

## Examples
```input
3
3 3
2 4
5 3
```
```output
Yes
No
Yes
```

## Note
In the first test case, Nikita can put $$$1$$$ cube on top of the tower $$$3$$$ times in a row, so the answer is "Yes".

In the second test case, Nikita can only end up with either a tower with no blocks or a tower with $$$2$$$ blocks, so the answer is "No".

Now solve the problem and return the code.