n = int(eval(input()))



for a in range(1, 10): 

	b = n // a

	if a * b == n and b >= 1 and b < 10:

		print("Yes")

		quit()



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



productos = []



def mult(N):

    for i in range(1,10):

        for n in range(1,10):



            calc = n * i

            productos.append(calc)



    if N in productos:

        print("Yes")

    else:

        print("No")

mult(N)
n = int(eval(input()))
for a in range(1, 10):
    b = n // a
    if a * b == n and b >= 1 and b < 10:
        print("Yes")
        quit()
print("No")

N = int(eval(input()))
productos = []


def mult(N):
    for i in range(1, 10):
        for n in range(1, 10):
            calc = n * i
            productos.append(calc)
    if N in productos:
        print("Yes")
    else:
        print("No")


mult(N)

-n = int(eval(input())) -for a in range(1, 10): -    b = n // a -    if a * b == n and b >= 1 and b < 10: +N = int(eval(input())) +productos = [] + + +def mult(N): +    for i in range(1, 10): +        for n in range(1, 10): +            calc = n * i +            productos.append(calc) +    if N in productos: -        quit() -print("No") +    else: +        print("No") + + +mult(N)