horn-ok-please
Source: hackerearth
Difficulty: EASY

Our favorite truck driver Ramesh has become quite bored driving trucks.So to make his long tedious journey more enjoyable he decides to do the following mental activity - he chooses a number N , and finds the sum of all i such that   
1 ≤ i ≤N  
gcd(i,N) = i  

He then gives this sum to Suresh . If the sum is double the value of N Suresh says "YES" otherwise Suresh says "NO" . One morning Suresh doesn't turn up . So he gives Suresh's task to you . Given the value of N , print "YES" if the above sum is twice the value of N or "NO" if otherwise .   

Input 
The first line of the input contains a single integer T-denoting the number of test cases.  
The first and only line of each test case contains a single integer N.    

Output 
For each test case print "YES" or "NO" according to the conditions stated above.    

Constraints 
1 ≤ T ≤ 1000  
1 ≤ N ≤ 10^6

SAMPLE INPUT
5
1
2
6
28
7237

SAMPLE OUTPUT
NO
NO
YES
YES
NO

Explanation

In the case of 1, the sum is 1 as gcd(1,1) = 1

In the case of 6, the sum is 12 (1 + 2 + 3 + 6) since gcd(1,6)=1, gcd(2,6)=2, gcd(3,6)=3, gcd(6,6)=6