N = int(eval(input()))

flag=False

for i in range(1,10):

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

        flag=True

print(("Yes" if flag else "No"))

N=int(eval(input()))



for i in range(1,10):

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

        print("Yes")

        exit()

print("No")

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

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

-flag = False -    if N % i == 0 and N / i <= 9: -        flag = True -print(("Yes" if flag else "No")) +    if 1 <= N / i <= 9 and N % i == 0: +        print("Yes") +        exit() +print("No")