import Data.Char
import Control.Applicative
main = do
	s <- getLine
	putStrLn $ solve s
    
solve :: String -> String
solve s = if mod n sn == 0 then "Yes" else "No"
	where n = read s
  	      sn = sum $ map digitToInt s