### Constructible Regular Polygons

##
A regular *n*-gon is constructible with ruler and compass if and only if *n* = 2^{k}*p*_{1}*p*_{2}...*pt*_{ } where *k* and *t* are non-negative integers, and each *p*_{i} is a (distinct) Fermat prime

Only five Fermat primes are known:

*F*_{0}= 3,*F*_{1}= 5,*F*_{2}= 17,*F*_{3}= 257, and*F*_{4}= 65537- (copied from wikipidea)

#include<stdio.h> int main() { int t; scanf("%d",&t); while(t--) { int N,temp; scanf("%d",&N); temp=N; while(temp % 2==0) temp=temp/2; if(temp % 3==0) temp=temp/3; if(temp % 5==0) temp=temp/5; if(temp % 17==0) temp=temp/17; if(temp % 257==0) temp=temp/257; if(temp % 65537==0) temp=temp/65537; if(temp==1) printf("Yes\n"); else printf("No\n"); } return 0; }