ans = "No"

N = int(eval(input()))

for i in range(1, 10):

    temp = N / i

    if 1 <= temp <= 9 and temp % 1 == 0:

        ans = "Yes"

        break

print(ans)
N = int(eval(input()))

ans = "No"

for i in range(1, 10):

    if N // i < 10 and (N // i) * i == N:

        ans = "Yes"

print(ans)
ans = "No"
N = int(eval(input()))
for i in range(1, 10):
    temp = N / i
    if 1 <= temp <= 9 and temp % 1 == 0:
        ans = "Yes"
        break
print(ans)

N = int(eval(input()))
ans = "No"
for i in range(1, 10):
    if N // i < 10 and (N // i) * i == N:
        ans = "Yes"
print(ans)

+N = int(eval(input())) -N = int(eval(input())) -    temp = N / i -    if 1 <= temp <= 9 and temp % 1 == 0: +    if N // i < 10 and (N // i) * i == N: -        break