Jack loves to play with numbers. One day, while he was playing with numbers he found something interesting. He saw some numbers were indivisible without 1 and the number itself. He named those number as magic number.
Your task is to find whether the square root of a number is magic number or not.
You will be given an integer T (1 ≤ T ≤ 40) in the first line. In the next T lines there will be an integer N (1 ≤ N ≤ 6.5 * 108).
Print “YES.” if square root of N is a magic number else print “NO.” (w/o quotes).
4 4 9 16 36
YES. YES. NO. NO.