Degree numbers#2328

Degree numbers

1 second
128 megabytes
Easy

A number is called a power number if it can be represented as the power of some positive integer raised to at least the second power.

Determine which of the given numbers are power numbers.

Input

The first line contains the number of integers n~(1 \le n \le 10). The second line contains integers, each greater than and less than 10^9.

Output

Print lines. On the -th line, print "YES" if the -th number is a power number, and "NO" otherwise.

Examples

Example 1

Loading
Loading