#Q248. 「一本通 6.7 练习 3」取石子

「一本通 6.7 练习 3」取石子

Description

Alice and Bob, two good friends, are playing a stone-taking game again. At the beginning of the game, there are NN piles of stones arranged in a row. They take turns to make moves (Alice goes first), and in each move, they can choose one of the following rules:

  • Take one stone from any pile;
  • Merge any two piles of stones.

The player who cannot make a move loses. Alice wants to know if she has a winning strategy.

Input Format

The first line contains TT, the number of test cases.

For each test case, the first line contains NN;
The next NN positive integers a1,a2,,ana_1, a_2, \cdots, a_n represent the number of stones in each pile.

Output Format

For each test case, output one line.

Output YES if Alice has a winning strategy, and NO otherwise.

Sample 1

3
3
1 1 2
2
3 4
3
2 3 5

YES
NO
NO

Constraints & Notes

For all test cases, T100,N50,ai1000T\le 100, N\le 50, a_i\le 1000.