import sys

n = int(eval(input()))



for i in range(1, 10):

  for j in range(1, 10):

    if i * j == n:

      print('Yes')

      sys.exit(0)

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



print('No')
import sys

n = int(eval(input()))
for i in range(1, 10):
    for j in range(1, 10):
        if i * j == n:
            print("Yes")
            sys.exit(0)
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(0)
print("No")

-import sys - -        if i * j == n: +        if n == (i * j): -            sys.exit(0) +            exit(0)