a,b=input().split();print(('YNeos'[int(a+b)!=int((int(a+b)**.5))**2::2]))
a,b=input().split();print(('YNeos'[int(a+b)!=int(int(a+b)**.5)**2::2]))
a, b = input().split()
print(("YNeos"[int(a + b) != int((int(a + b) ** 0.5)) ** 2 :: 2]))

a, b = input().split()
print(("YNeos"[int(a + b) != int(int(a + b) ** 0.5) ** 2 :: 2]))

-print(("YNeos"[int(a + b) != int((int(a + b) ** 0.5)) ** 2 :: 2])) +print(("YNeos"[int(a + b) != int(int(a + b) ** 0.5) ** 2 :: 2]))