a, b = input().split()

c = int(a + b)

print(("Yes" if c ** 0.5 % 1 == 0 else "No"))

a, b = list(map(str, input().split()))

c = int(a + b)

if c ** 0.5 == int(c ** 0.5):

    print("Yes")

else:

    print("No")

a, b = input().split()
c = int(a + b)
print(("Yes" if c**0.5 % 1 == 0 else "No"))

a, b = list(map(str, input().split()))
c = int(a + b)
if c**0.5 == int(c**0.5):
    print("Yes")
else:
    print("No")

-a, b = input().split() +a, b = list(map(str, input().split())) -print(("Yes" if c**0.5 % 1 == 0 else "No")) +if c**0.5 == int(c**0.5): +    print("Yes") +else: +    print("No")