using System;
 
class MainClass{
  public static void Main(string[] args){
    long n = 0;
    long N = 0;
    long cnt = 0;
    string s = Console.ReadLine();
 
    N = long.Parse(s);
    cnt = s.Length;
 
    string[] c = new string[cnt];
 
    for(int i =0; i < cnt; i++){
      n += long.Parse(s.Substring(i,1));
    }
 
    if((M % n) == 0){Console.WriteLine("Yes");}else{Console.WriteLine("No");}
  }
}