solve :: Int -> Int -> Int -> Bool
solve n 9 9
    | n == 81 = True
    | otherwise = False
solve n a b 
    | a * b == n = True
    | b == 9 = solve n (a+1) 1
    | otherwise  = solve n a (b+1)

main = do
    n <- readLn
    putStrLn $ if solve n 1 1 then "Yes" else "No"