open Batteries
open Printf
let () =
  let n = Scanf.scanf "%d " (fun a -> a) in

  let rec digits base n res =
    if n = 0 then res 
    else digits base (n/base) ((n mod base)::res)
  in

  let digits_l = digits 10 n [] in
  let sum = List.fold_left (+) 0 digits_l in

  Printf.printf "%s\n" @@
  if n mod sum = 0 then "Yes" else "No"
