| Bitshift2026-IITM,ProgClub |
|---|
| Finished |
As usual, as always, once again, Alice and Bob play a game with an array of integers. Both of them have a score of $$$0$$$ at the start of the game.
They start with an array $$$A$$$ of $$$n$$$ positive integers and play in turns. In each turn, the player must:
Equivalently, let $$$$$$x = t \cdot k^{p}$$$$$$ where $$$p \ge 1$$$ is the largest integer such that $$$k^{p}$$$ divides $$$x$$$, and $$$t \bmod k \neq 0$$$. Then, the original $$$x$$$ is removed from the array and the number $$$t$$$ is added back to the array.
The game ends when the array becomes empty. The winner is the player with the lower score at the end. If the scores are equal, the game is considered a tie.
Alice goes first. Given the initial array $$$A$$$, determine whether Alice wins the game or not, if both the players play optimally.
The first line of each test contains a single integer $$$t ~ (1 \leq t \leq 10^3 )$$$ — the number of test cases.
The first line of each test case contains a positive integer $$$n ~ (1 \leq n \leq 2 \cdot 10^5)$$$ — the number of elements in the array $$$A$$$.
The second line of each test case contains $$$n$$$ positive integers $$$a_1 , a_2 , ... , a_n ~ (1 \leq a_i \leq 10^9)$$$ — denoting the array elements.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$2 \cdot 10^5$$$
For each test case, output a single line containing the word "YES" — if Alice wins the game and "NO" — otherwise.
418413 26 39 52370 30 70210 20
YESNOYESNO
For the first test case, the game proceeds as follows:
For the second test case, a possible game proceeds as follows:
| Name |
|---|


