N = int(eval(input()))



for i in range(1, 10):

    for j in range(1, 10):

        if i * j == N:

            print("Yes")

            exit()



print("No")
N = int(eval(input()))



for x in range(1, 10):

    for y in range(1, 10):

        if x * y == N:

            print("Yes")

            exit()



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

N = int(eval(input()))
for x in range(1, 10):
    for y in range(1, 10):
        if x * y == N:
            print("Yes")
            exit()
print("No")

-for i in range(1, 10): -    for j in range(1, 10): -        if i * j == N: +for x in range(1, 10): +    for y in range(1, 10): +        if x * y == N: