|All-time Popular Problems|
|Delete without head pointer|
|Check if a number is power of another number|
|Array to BST|
|Implement Queue using Linked List|
|Lowest Common Ancestor in a BST|
|Reverse a Linked List in groups of given size.|
|Print all nodes that don’t have sibling|
|Equal to product|
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).