n = int(eval(input()))





def judge(n):

    for i in range(1, 10):

        for j in range(1, 10):

            if n == i * j:

                print("Yes")

                return



    print("No")





judge(n)
n = int(eval(input()))



for i in range(1,10):

    if n % i == 0 and n / i <= 9:

        print("Yes")

        quit()



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


def judge(n):
    for i in range(1, 10):
        for j in range(1, 10):
            if n == i * j:
                print("Yes")
                return
    print("No")


judge(n)

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

- - -def judge(n): -    for i in range(1, 10): -        for j in range(1, 10): -            if n == i * j: -                print("Yes") -                return -    print("No") - - -judge(n) +for i in range(1, 10): +    if n % i == 0 and n / i <= 9: +        print("Yes") +        quit() +print("No")