Sumit and Dhiraj are roommates in a hostel of NIT Jamshedpur,One day after completing there boring assignments of Artificial Intelligence, they decided to play a game as it was dhiraj,s idea to play a game so he started explaining the rules of the game to sumit.
So the game was as follows-They randomly took a number N after that they find all its divisors.Suppose first sumit took a divisor then dhiraj and so on.The player who will be having the last divisor with him will win the game.Rohit their mutual friend,was observing them play. Can you help Rohit predict the outcome of game? If Sumit wins print "YES" without quotes and "NO" without quotes, if Dhiraj wins
the game.

-----Input-----
Input starts with an integer T denoting the number of test cases Each test case starts with a line containing an integer N the number.

-----Output-----
Outcome of each game in a separate line

-----Constraints-----
- 1 ≤ T ≤ 10^3
- 1 ≤ N ≤ 10^18

-----Sub tasks-----
- Subtask #1:(10 points)

- 1 ≤ T ≤ 10
- 1 ≤ N ≤ 103
- Subtask #2:(25 points)

- 1 ≤ T ≤ 50
- 1 ≤ N ≤ 1016
- Subtask #3:(65 points)

- 1 ≤ T ≤ 103
- 1 ≤ N ≤ 1018

-----Example-----
Input:
2
4
5

Output:
YES
NO

Difficulty: interview

Starter code:

Solutions:
import math
for t in range(int(input())):
 n = int(input())
 temp = math.sqrt(n)
 if (temp == int(temp)):
  print("YES")
 else:
  print("NO")

t=int(input());
for i in range (0,t):
 c=0;
 n=int(input());
 for j in range (1,n+1):
  if(n%j==0):
   c=c+1;
 if(c%2==0):
  print("NO\n");
 else:
  print("YES\n");

from functools import reduce
def get_prime_factors(number):
 if number == 1:
  return []

 for i in range(2, number):
  # Get remainder and quotient
  rd, qt = divmod(number, i)
  if not qt: # if equal to zero
   return [i] + get_prime_factors(rd)

 return [number]

T = int(input())

for j in range(T):
 n = int(input())
 divisors = get_prime_factors(n)
 #print divisors
 
 count = [1 for x in range(len(divisors))] 
 for i in range(len(divisors)):
  while n%divisors[i] == 0:
   count[i]=count[i]+1
   n=n/divisors[i]
   
 # print count
 num = reduce(lambda x, y: x*y, count)

 if num%2==0:
  print("NO")
 else:
  print("YES")
 


def main():
 t = eval(input())
 for i in range(0,t):
  count = 0
  n = eval(input())
  for j in range(1,n+1):
   if n%j == 0:
    count +=1
  if count%2 == 0:
   print("NO\n")
  else :
   print("YES\n")
main()


import math
def is_square(integer):
 root = math.sqrt(integer)
 if int(root + 0.5) ** 2 == integer: 
  return "YES"
 else:
  return "NO"
for i in range(eval(input())):
 n=eval(input())
 print(is_square(n))


from functools import reduce
def factors(n):    
 return set(reduce(list.__add__, 
    ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))
t=eval(input())
while(t):
 leng = 0
 t = t - 1
 m = eval(input())
 leng = len(factors(m))
 if(leng%2):
  print("YES")
 else:
  print("NO")


from math import sqrt
for t in range(int(input())):
 n=int(input())
 if int(sqrt(n))==float(sqrt(n)):
  print("YES")
 else:
  print("NO")

import math
T= int(input())

for t in range(T):
 s =set()
 n = int(input())
 for i in range(1,int(math.sqrt(n))+1):
  if n%i==0:
   s.add(i)
   s.add(n/i)
 if len(s)%2!=0:
  print("YES")
 else:
  print("NO")

t=int(input())
c=0
while (t):
 n=int(input())
 for i in range(1,n):
  if n%i==0:
   c+=1
 
 if c%2==0:
  print("YES\n")
 else:
  print("NO\n")
 c=0
 t=t-1

def divisors(n):
 count=2 # accounts for 'n' and '1'
 i=2
 while(i**2 < n):
  if(n%i==0):
   count+=2
  i+=1
 count+=(1 if i**2==n else 0)
 return count 
T = int(input())
for t in range(T):
 n = int(input())
 d = divisors(n)
 if d%2!=0:
  print("YES")
 else:
  print("NO")

from math import sqrt
for _ in range(int(input())):
 n = int(input())
 r = int(sqrt(n))
 print("YES" if r * r == n else "NO")

for __ in range(eval(input())) :
 n = eval(input())
 k = n**0.5
 if int(k)*int(k) == n :
  print("YES")
 else :
  print("NO")


t=eval(input())
while t:
 r=0
 n=eval(input())
 for i in range(1,n+1):
  if n%i==0:
   r=r+1
 if r%2==1:
  print("YES")
 else:
  print("NO")
 t=t-1

from math import *
t=int(input())
while t:
 n=int(input())
 p=sqrt(n)
 if p*p==n:
  print("YES")
 else:
  print("NO")
 t-=1

import math
#Good_one
def is_square(integer):
 root = math.sqrt(integer)
 if int(root + 0.5) ** 2 == integer: 
  return True
 else:
  return False
for KK_KK in range(eval(input())):

 a=eval(input())
 k=is_square(a)
 if k==True:
  print("YES")
 else:
  print("NO")
 


import math
# Source Stack Overflow :p
def divisorGenerator(n):
 large_divisors = []
 for i in range(1, int(math.sqrt(n) + 1)):
  if n % i == 0:
   yield i
   if i*i != n:
    large_divisors.append(n / i)
 for divisor in reversed(large_divisors):
  yield divisor

 
 
 #return len(k)
for KK_KK in range(eval(input())):

 a=eval(input())
 k= list(divisorGenerator(a))
 #print k
 if len(k)%2==0:
  print("NO")
 else:
  print("YES")


import math
for t in range(int(input())):
 n = int(input())
 i = 1
 count = 0
 x = math.sqrt(n)
 while (i<=x):
  if (n%i==0):
   count+=1
   if (i!=n/i):
    count+=1
  i+=1
 if (count%2==0):
  print("NO")
 else:
  print("YES")

for t in range(int(input())):
 n = int(input())
 i = 1
 count = 0
 while (i*i<=n):
  if (n%i==0):
   temp = n/i
   if (i==temp):
    count+=1
   else:
    count+=2
  i+=1
 if (count%2==0):
  print("NO")
 else:
  print("YES")

import math

t=int(input())
for i in range(t):
 n=int(input())
 sq=int(math.sqrt(n))
 if sq*sq==n:
  print("YES")
 else:
  print("NO")