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;

			for (int i = 0; i < cnt; i++)
			{
				n += long.Parse(s.Substring(i, 1));
			}

			if ((N % n) == 0) { Console.WriteLine("Yes"); } else { Console.WriteLine("No"); }
  }
}