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

abint = int(a+b)

ans = 0

for i in range(1,1001):
    for j in range(1,1001):
        if i*j == abint and i == j:
            ans = ans + 1

if ans == 0:
    print("No")
else:
    print("Yes")
