Playing With Stones

No attempts yetTime limit1sMemory limit128 MB

Problem

You and a friend play a game in which you take turns removing stones from piles. Initially there are NN piles containing a1,a2,a3,,aNa_1, a_2, a_3, \ldots, a_N stones. On each turn, a player must choose one pile and remove at least one stone from it, but no more than half of that pile's current number of stones (that is, at most ai/2\lfloor a_i / 2 \rfloor stones). A player who cannot make any move loses.

For example, with three piles of 55, 11, and 22 stones, a player may take 11 or 22 stones from the first pile, cannot take anything from the second pile, and may take only 11 stone from the third pile. No stone can be taken from the second pile because 11 is more than half of 11 (the size of that pile).

Assume both players play optimally and you move first. Determine whether you have a winning move. You have a winning move if, after making it, you can eventually win no matter how your friend responds.

Input

The first line contains an integer TT (T100T \le 100), the number of test cases. Each test case begins with a line containing an integer NN (1N1001 \le N \le 100), the number of piles. The next line contains NN integers a1,a2,a3,,aNa_1, a_2, a_3, \ldots, a_N (1ai2×10181 \le a_i \le 2 \times 10^{18}), the number of stones in each pile.

Output

For each test case, print "YES" if you have a winning move, or "NO" if you do not.