def p(n,b):
    return n*n<=b

def demo():
    b=int(input())
    l,r=1,10**9+7
    ans=0
    while l<=r:
        mid = (r - l) // 2 + l
        if p(mid,b):
            ans=mid
            l=mid+1
        else:
            r=mid-1
    if ans**2==b:
        print("YES")
    else:
        print("NO")

t=int(input())
while t:
    t-=1
    demo()