open System


[<EntryPoint>]
let main argv =
    let rec dsum n = if n <=0 then 0 else (dsum (n/10))+(n%10)
    let n = stdin.ReadLine()|>int
    if (n%(dsum n))=0 then "Yes" else "No"
    |>stdout.WriteLine
    0