## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

## [Solution] Is this priority or parity!  CodeChef Solution | CodeChef Problem Solution 2022

$N$ integers $1,2,3,\dots N$ are placed on a circle in clockwise order such that $i$ and $\left(i+1\right)$ are adjacent for all $1\le i\le N-1$, and $1$ and $N$ are also adjacent.

Given an integer $K$, Ashish repeatedly removes integers from the circle until only one integer remains. He does so in the following manner. In each move, Ashish finds the integer which is on the $K$-th place from the smallest one in clockwise order and removes it from the circle, i.e. its neighbours now become adjacent.

For example, consider the case when $N=3$ and $K=3$. Let the circular array $\left[1,2,3\right]$ denote the integers on the circle. In the first move, $3$ is removed since it is the $K$-th integer starting from $1$, which is the smallest integer currently on the circle. Likewise, in the next move $1$ is removed and finally only $2$ remains. $\left[1,2,\underset{_}{3}\right]\to \left[\underset{_}{1},2\right]\to \left[2\right]$.

Since $N$ and $K$ may be very large, Ashish cannot simulate the process himself. Help him find the parity of the last integer that remains after the repeated removals. In other words, report if this integer is odd or even.

### Input Format

• The first line contains a single integer $T$ — the number of test cases.
• Then the test cases follow.
• The first and only line of each test case contains two integers $N$ and $K$.

### Output Format

For each test case, output ODD if the last integer that remains after the repeated removals is odd, and EVEN otherwise.

Each letter of the output may be printed in either lowercase or uppercase. For example, the strings oddOdd, and ODD will all be treated as equivalent.