N=int(eval(input()))

for i in range(9):

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

        print('Yes')

        break

else:

    print('No')

N=int(eval(input()))

print(('YNeos'[not [i for i in range(1,10) if N%i==0 and N//i<10]::2]))
N = int(eval(input()))
for i in range(9):
    if N % (i + 1) == 0 and N // (i + 1) < 10:
        print("Yes")
        break
else:
    print("No")

N = int(eval(input()))
print(("YNeos"[not [i for i in range(1, 10) if N % i == 0 and N // i < 10] :: 2]))

-for i in range(9): -    if N % (i + 1) == 0 and N // (i + 1) < 10: -        print("Yes") -        break -else: -    print("No") +print(("YNeos"[not [i for i in range(1, 10) if N % i == 0 and N // i < 10] :: 2]))