f a b n
    | a * b == n    = "Yes"
    | a == 0        = "No"
    | b > 0         = f a (b-1) n
    | b == 0        = f (a-1) 9 n
    | otherwise     = "No"

solve n = f 9 9 n

main = do
    n <- readLn
    putStrLn $ solve n