import Data.List

main :: IO ()
main = do
  l1 <- getLine
  let [n] = map read $ words l1 :: [Int]
      f l1 l2 = do
        a <- l1
        b <- l2
        return $ a*b
      l = f [1..9] [1..9]
  putStrLn $ if n `elem` l then "Yes" else "No"
