n = int(eval(input()))

print(("Yes" if any([n == x * y for x in range(1, 10) for y in range(1, 10)]) else "No"))
n = int(eval(input()))

print(("Yes" if sum([n == x * y for x in range(1, 10) for y in range(1, 10)]) else "No"))
n = int(eval(input()))
print(
    ("Yes" if any([n == x * y for x in range(1, 10) for y in range(1, 10)]) else "No")
)

n = int(eval(input()))
print(
    ("Yes" if sum([n == x * y for x in range(1, 10) for y in range(1, 10)]) else "No")
)

-    ("Yes" if any([n == x * y for x in range(1, 10) for y in range(1, 10)]) else "No") +    ("Yes" if sum([n == x * y for x in range(1, 10) for y in range(1, 10)]) else "No")