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()))

d=set([i*j for i in range(1,10) for j in range(1,10)])

print(("Yes" if n in d else "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()))
d = set([i * j for i in range(1, 10) for j in range(1, 10)])
print(("Yes" if n in d else "No"))

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