n = int(eval(input()))

s = set()

for i in range(1,10):

  for j in range(1,10):

    s.add(i*j)

if n in s:

  print('Yes')

else:

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

for i in range(1,10):

  if n % i == 0 and 0 < n // i < 10:

    print('Yes')

    break

else:

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

n = int(eval(input()))
for i in range(1, 10):
    if n % i == 0 and 0 < n // i < 10:
        print("Yes")
        break
else:
    print("No")

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