let () =
  Scanf.scanf "%d\n" @@ fun n ->
  let len = String.length (string_of_int n) in
  let rec sum n i len =
    let jyu = int_of_float (10. ** float_of_int (i-1)) in
    if i > len then 0 else (n / jyu) mod (jyu*10) + sum n (i+1) len in
  Printf.printf "%s\n" (if n mod (sum n 1 len) = 0 then "Yes" else "No")