/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int sum = 0;
		
		int temp = n;
		
		while(temp>0){
			sum+=temp%10;
			temp/=10;
		}
		
		if(n%sum == 0)
			System.out.println("Yes");
		else	
			System.out.println("No");
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int sum = 0;
		
		int temp = n;
		
		while(temp>0){
			sum+=temp%10;
			temp/=10;
		}
		
		if(n%sum == 0)
			System.out.println("Yes");
		else	
			System.out.println("No");
	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int sum = 0;
		
		int temp = n;
		
		while(temp>0){
			sum+=temp%10;
			temp/=10;
		}
		
		if(n%sum == 0)
			System.out.println("Yes");
		else	
			System.out.println("No");
	} main {
		// your code goes here
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int sum = 0;
		
		int temp = n;
		
		while(temp>0){
			sum+=temp%10;
			temp/=10;
		}
		
		if(n%sum == 0)
			System.out.println("Yes");
		else	
			System.out.println("No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int sum = 0; sum 0 int temp = n; temp n while(temp>0){
			sum+=temp%10;
			temp/=10;
		} temp>0 temp 0 {
			sum+=temp%10;
			temp/=10;
		} sum+=temp%10 sum temp%10 temp 10 temp/=10 temp 10 if(n%sum == 0)
			System.out.println("Yes");
		else	
			System.out.println("No"); n%sum == 0 n%sum n sum 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args
/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int sum = 0;
		
		int temp = n;
		
		while(temp>0){
			sum+=temp%10;
			temp/=10;
		}
		
		if(n%sum == 0)
			System.out.println("Yes");
		else	
			System.out.println("No");
	}
}