import Data.Char
main :: IO ()
main = do
  n <- getLine
  let f = fx n 
  putStrLn $ if last [f,(f*2)..(read n)] == read n then "Yes" else "No"

fx :: String -> Int
fx "" = 0
fx (x:xs) = digitToInt x + fx xs
