As we know that every number >=2 can be represented as natural powers of primes(prime factorization). Also prime factorization is unique for a number.
Eg. 360 = 233251
Today we are interested in geek numbers. A geek number is a number whose prime factorization only contains powers of unity.Below are some geek numbers.
Eg. 2 = 21
22 = 21111
First line of the input file contains an integer T which denotes the number of test cases. Then T test cases follow. First line of each test case contains a number N.
For each test case, print "Yes"(without quotes) if it is a geek number, else print "No"(without quotes).
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.