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

c = int(a + b)



for i in range(c):

    if i**2 == c:

        ans = 'Yes'

        break

    else:

        ans = 'No'



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

c = int(a + b)



for i in range(4, 317):

    if i**2 == c:

        ans = 'Yes'

        break

    else:

        ans = 'No'



print(ans)
a, b = list(map(str, input().split()))
c = int(a + b)
for i in range(c):
    if i**2 == c:
        ans = "Yes"
        break
    else:
        ans = "No"
print(ans)

a, b = list(map(str, input().split()))
c = int(a + b)
for i in range(4, 317):
    if i**2 == c:
        ans = "Yes"
        break
    else:
        ans = "No"
print(ans)

-for i in range(c): +for i in range(4, 317):