n=int(eval(input()))

for i in range(1,10):

  if n%i==0 and n//i<10: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):
    if n % i == 0 and n // i < 10:
        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")

-    if n % i == 0 and n // i < 10: -        print("Yes") -        exit() +    for j in range(1, 10): +        if n == i * j: +            print("Yes") +            exit()