377 传统题

[CF2289A] 因数奇偶卡牌博弈 (Problem from Dolgoderevenskoye)

时间限制
1000ms
内存限制
256MiB
登顶 / 尝试
1/ 1
难度
2

[CF2289A] 因数奇偶卡牌博弈 (Problem from Dolgoderevenskoye)

Problem Statement

You are given a positive integer xx. Consider a set of cards such that for every positive divisor dd of the number xx, there is exactly one card with the number dd.

Two players play the following game. The players take turns, with Artem moving first. On each move, a player must remove one card from the set.

On the first move, Artem may remove any card. On each subsequent move, the player must remove a card whose parity is opposite to the parity of the card removed on the previous move. The player who cannot make a move loses.

Determine whether Artem will win if both players play optimally.

Input

Each test contains multiple test cases. The first line contains tt (1≤t≤1041 \le t \le 10^4). The only line of each test case contains one integer xx (1≤x≤10181 \le x \le 10^{18}).

Output

For each test case, output "Yes" if Artem wins, and "No" otherwise (case-insensitive).

样例

10
1
2
6
12
8
31
74
75
1111111111
998244358989466118
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes
No