题解 | A×A=B
A×A=B
https://www.nowcoder.com/practice/0cff379fe362488aa07defe35dba75cc
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()

