P13074 [HackerEarth] help the hungry grasshopper
普及
题目描述

Today grasshopper Jimmy Jumper is very hungry and his friend is notorious. Jimmy's friend puts an insect infront of him at a distance d. Jimmy can jump only a finite no of steps in each turn. Jimmy is initially at position 0. He can now jump 1 step to reach position 1 then jump 2 steps to reach position 3 then jump 4 steps to position 7 and so on.

Since Momu is very hungry and could not take risk of jumping but not reaching to the destination point, so you have to tell him whether he can reach to position d or not.

Input:

First line contains t test cases.
Next t lines contains an integer d.

Constraints:

1 ≤ t ≤ 10

1 ≤ d ≤ 10^9

Output:

t lines each containing "YES" if he can reach or "NO" if cannot

Test case:

Input:

3

3

15

5

Output:

YES

YES

NO

SAMPLE INPUT
3
3
15
5

SAMPLE OUTPUT
YES
YES
NO

输入格式

见题面

输出格式

见题面

样例输入
3 3 15 5 SAMPLE
样例输出
YES YES NO