main :: IO ()
main = do
  n <- getLine
  putStrLn $ solve n

solve :: String -> String
solve s = if n `mod` n' == 0
          then "Yes"
          else "No"
  where
    n :: Int
    n = read s
    zero = fromEnum '0'
    n' = sum $ map (\c -> fromEnum c - zero) s
