n = int(eval(input()))

for i in range(1, 10):

    for j in range(i, 10):

        if n == i*j:

            print('Yes')

            exit()

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

s = set()

for i in range(10):

    for j in range(i, 10):

        s.add(i*j)

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

n = int(eval(input()))
s = set()
for i in range(10):
    for j in range(i, 10):
        s.add(i * j)
print(("Yes" if n in s else "No"))

-for i in range(1, 10): +s = set() +for i in range(10): -        if n == i * j: -            print("Yes") -            exit() -print("No") +        s.add(i * j) +print(("Yes" if n in s else "No"))