{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import           Data.List (unfoldr)


main :: IO ()
main = do
  n <- readLn
  putStrLn $ if solve n then "Yes" else "No"

solve :: Int -> Bool
solve n = n `mod` s n == 0

s :: Int -> Int
s = sum . unfoldr f where
  f 0 = Nothing
  f x = Just (x `mod` 10, x `div` 10)
