Rupsa really loves triangles. One day she came across an equilateral triangle having length of each side as an integer N. She started wondering if it was possible to transform the triangle keeping two sides fixed and alter the third side such that it still remains a triangle, but the altered side will have its length as an even integer, and the line drawn from the opposite vertex to the mid-point of the altered side is of integral length.
Since Rupsa is in a hurry to record a song for Chef as he really loves her songs, you must help her solve the problem as fast as possible.

-----Input-----
The first line of input contains an integer T denoting the number of test cases.
Each test-case contains a single integer N.

-----Output-----

For each test case, output "YES" if the triangle transformation is possible, otherwise "NO" (quotes for clarity only, do not output).

-----Constraints-----
- 1 ≤ T ≤ 106
- 1 ≤ N ≤ 5 x 106

-----Sub tasks-----
- Subtask #1: 1 ≤ T ≤ 100, 1 ≤ N ≤ 104 (10 points)
- Subtask #2: 1 ≤ T ≤ 104, 1 ≤ N ≤ 106 (30 points)
- Subtask #3: Original Constraints (60 points)

-----Example-----
Input:2
5
3

Output:YES
NO

-----Explanation-----
- In test case 1, make the length of any one side 6, and it will suffice.

Difficulty: interview

Starter code:

Solutions:
# cook your dish here
import math
def isPos(num):
 if num%2==0:
  for i in range(num,2*num,1):
   if ((num**2)-((i/2)**2))**(1/2)==int(((num**2)-((i/2)**2))**(1/2)):
    return 'YES'
  return 'NO'
 else:
  for i in range(num+1,2*num,1):
   if ((num**2)-((i/2)**2))**(1/2)==int(((num**2)-((i/2)**2))**(1/2)):
    return 'YES'
  return 'NO'

test = int(input())
for __ in range(test):
 num=int(input())
 print(isPos(num))


# cook your dish here
import math
t = int(input())
for _ in range(t):
 n = int(input())
 count = 0
 for i in range(2, 2*n, 2):
  #print(i)
  h = math.sqrt(n*n-(i*i/4))
  #print(h)
  if h.is_integer()== True:
   count+=1
  else:
    count+=0
 if count>=1:
  print("YES")
 else:
  print("NO")

t=int(input())
import math

for i in range(t):
 b=[]
 n=int(input())
 for p in range(n+1,2*n):
  if p%2==0:
   
   a= math.sqrt(n**2 - (p/2)**2)
   if a-int(a)==0:
    b.append(i)
 if len(b)==0:
  print("NO")
 elif len(b)!=0:
  print("YES") 
    
 


import math
t = int(input())
for _ in range(0,t):
 n = int(input())
 #print(n)
 sides = []
 for i in range(2,(n+n)):
  if i % 2 == 0 and i != n:
   sides.append(i//2)
 f = 0
 for i in sides:
  pyt = (n*n - i*i)
  if math.sqrt(pyt) - int(math.sqrt(pyt)) == 0.000000:
   print("YES")
   f = 1
   break
 if f == 0:
  print("NO")


import math
t = int(input())
for _ in range(0,t):
 n = int(input())
 #print(n)
 sides = []
 for i in range(2,(n+n)):
  if i % 2 == 0 and i != n:
   sides.append(i//2)
 f = 0
 for i in sides:
  pyt = (pow(n,2)) - (pow(i,2))
  if math.sqrt(pyt) - int(math.sqrt(pyt)) == 0.000000:
   print("YES")
   f = 1
   break
 if f == 0:
  print("NO")


t=int(input())
for i in range(t):
 n=int(input())
 c=0
 for j in range(2,n,2):
  if int((n**2-j**2)**0.5)==(n**2-j**2)**0.5:
   c=c or 1
   break
  else:
   c=c or 0
 if c==1:
  print("YES")
 else:
  print("NO")


t=int(input())
for i in range(t):
 n=int(input())
 ans=0
 for j in range(2,n,2):
  if int((n**2-j**2)**0.5)==(n**2-j**2)**0.5:
   ans=ans or 1
   break
  else:
   ans=ans or 0
 if ans==1:
  print("YES")
 else:
  print("NO")