a,b=input().split()

print(('Yes' if (int(a+b)**.5).is_integer() else 'No'))
print(('No' if int(input().replace(' ',''))**.5%1 else 'Yes'))
a, b = input().split()
print(("Yes" if (int(a + b) ** 0.5).is_integer() else "No"))

print(("No" if int(input().replace(" ", "")) ** 0.5 % 1 else "Yes"))

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