num = int(eval(input()))



n = 1

while n < 10:

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

    print('Yes')

    break

    

  n += 1

    

if n == 10:

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

n = 0



for i in range(1,10):

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

        n += 1

    

ans = 'Yes' if n >= 1 else 'No' 

print(ans)
num = int(eval(input()))
n = 1
while n < 10:
    if num % n == 0 and num // n < 10:
        print("Yes")
        break
    n += 1
if n == 10:
    print("No")

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

-num = int(eval(input())) -n = 1 -while n < 10: -    if num % n == 0 and num // n < 10: -        print("Yes") -        break -    n += 1 -if n == 10: -    print("No") +c = int(eval(input())) +n = 0 +for i in range(1, 10): +    if c / i < 10 and c % i == 0: +        n += 1 +ans = "Yes" if n >= 1 else "No" +print(ans)