SINEGGS - Sinha and Eggs

Sinha is a naughty kid, who always irritates Shukla with his activities. One day Sinha bought some eggs, but indulged in his pranks, forgets them in Shukla's room. Shukla being a considerate friend wanted to teach Sinha a lesson. He puts a condition in front of Sinha, he will give him a number and Sinha has to tell if it has an "Odd" number of factors. If Sinha answers the questions correctly, he shall return the eggs. Since, Sinha can't focus on the problem due to his mischievous nature, he asks you to help him.

Input

You are given a number 't' in firstĀ  line depicting number of test cases. The next n lines contain a number 'n' each.

Input Constraints:

1 < =T <= 100000

1<= N <= 10^11

Output

You have to print "YES" if the number 'n' has an odd number of factors, else print "NO".

Example

Input:
3
10
4
6
Output: NO
YES
NO

Added by:ViKku
Date:2016-10-06
Time limit:0.100s-1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 GOSU

hide comments
2019-12-27 23:28:13
Can some one check 25142999 please?

Last edit: 2019-12-27 23:28:24
2019-11-02 10:48:47
For exactly same algorithm,
>TLE with Java :(
>AC with C++ :)
2018-06-06 17:09:25
TLE!!
2017-07-25 12:11:22
Can someone check my submission 19858370...Its coming correct answer for all test cases
Its coming time limit exceeded

Last edit: 2017-07-25 12:11:49
2017-02-19 08:07:00 hanstan
2nd century AC :D
2016-12-12 13:37:32
ACC. PYPY.
2016-11-21 20:54:57
woohooo.. AC in one go !
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.