N = int(eval(input()))

for i in range(1, 10):

  if N % i == 0 and N // i <= 9:

    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 <= 9:
        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 <= 9: -        print("Yes") -        exit() +    for j in range(1, 10): +        if N == i * j: +            print("Yes") +            exit()