x = int(eval(input()))

count =0



for n in range(1, 10):

    for k in range(1, 10):

        a = n * k

        if a == x:

            print('Yes')

            exit()

        else:

            pass

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



for n in range(1, 10):

    for k in range(1, 10):

        a = n * k

        if a == x:

            print('Yes')

            exit()

        else:

            pass

print('No')
x = int(eval(input()))
count = 0
for n in range(1, 10):
    for k in range(1, 10):
        a = n * k
        if a == x:
            print("Yes")
            exit()
        else:
            pass
print("No")

x = int(eval(input()))
for n in range(1, 10):
    for k in range(1, 10):
        a = n * k
        if a == x:
            print("Yes")
            exit()
        else:
            pass
print("No")

-count = 0