URI Online Judge | 1577

Constructible Regular Polygons

By Alexandre Campos, UNIUBE BR Brazil

Timelimit: 3

The investigation of which regular polygons can be constructed only with compass and straightedge is a classical problem in mathematics. Triangle, square, hexagon can easily be constructed, but, can we construct a regular heptagon? It was the German mathematician Gauss (1777-1855) who first proved that one could construct a 17-sided regular polygon and later, in one the of the most beautiful math works of all time (Disquisitiones Arithmeticae, 1798), he gave sufficient conditions to decide which regular polygons can be constructed.

Input

In the first line, an integer T<50000 representing the number of test cases; then, T integer numbers representing the number of sides of a non-degenerated regular polygon, up to 1000000 (106).

Output

Print “Yes” if the regular polygon can be constructed with compass and straightedge or “No” otherwise.

Sample Input Sample Output






9

Yes 
Yes 
No 
Yes 
No