import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe
import Control.Monad

main = do
  n <- readLn :: IO Int
  putStrLn $ if mod n (digitSum n)==0 then "Yes" else "No"
  
digitSum = sum .map digitToInt .show