import Control.Applicative
import Data.List

main :: IO ()
main = solve <$> readLn >>= putStrLn

solve :: Int -> String
solve n = case find f [1..9] of
  Just _ -> "Yes"
  Nothing -> "No"
  where
    f x = let (q, r) = n `divMod` x in q < 10 && r == 0
