N=int(eval(input()))

cnt=0

if 1<=N<10:

  cnt+=1

elif N>81:

  pass

else:

  for i in range(2,10):

    if N%i==0 and (N/i)<10:

      cnt+=1

if cnt==0:

  print("No")

else:

  print("Yes")
N = int(eval(input()))

cnt = 0

for i in range(1,10):

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

    cnt = 1

    break

  

if cnt == 1:

  print("Yes")

else:

  print("No")
N = int(eval(input()))
cnt = 0
if 1 <= N < 10:
    cnt += 1
elif N > 81:
    pass
else:
    for i in range(2, 10):
        if N % i == 0 and (N / i) < 10:
            cnt += 1
if cnt == 0:
    print("No")
else:
    print("Yes")

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

-if 1 <= N < 10: -    cnt += 1 -elif N > 81: -    pass +for i in range(1, 10): +    if N % i == 0 and 1 <= N / i <= 9: +        cnt = 1 +        break +if cnt == 1: +    print("Yes") -    for i in range(2, 10): -        if N % i == 0 and (N / i) < 10: -            cnt += 1 -if cnt == 0: -else: -    print("Yes")