n=int(eval(input()))

for i in range(1,10):

    for j in range(1,10):

        if n==i*j:

            print("Yes")

            exit()

print("No")

n=int(eval(input()))

for i in range(1,10):

    for j in range(1,i+1):

        if n==i*j:

            print("Yes")

            exit()

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

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

-    for j in range(1, 10): +    for j in range(1, i + 1):