N = int(eval(input()))



l = []

for i in range(1, 10):

    for j in range(1, 10):

        l.append(i * j)



if N in l:

    print('Yes')

else:

    print('No')
x = int(eval(input()))

ans = "No"

for i in range(1,10):

    for j in range(1,10):

        if i*j==x:

            ans = "Yes"

print(ans)
N = int(eval(input()))
l = []
for i in range(1, 10):
    for j in range(1, 10):
        l.append(i * j)
if N in l:
    print("Yes")
else:
    print("No")

x = int(eval(input()))
ans = "No"
for i in range(1, 10):
    for j in range(1, 10):
        if i * j == x:
            ans = "Yes"
print(ans)

-N = int(eval(input())) -l = [] +x = int(eval(input())) +ans = "No" -        l.append(i * j) -if N in l: -    print("Yes") -else: -    print("No") +        if i * j == x: +            ans = "Yes" +print(ans)