import java.util.*;

public class Main {
	  public static void main(String args[]){
      	Scanner scan = new Scanner(System.in);
            
        String a = scan.next();
        String cnt;
        
        int sum = 0;
        
        for( int i = 0 ; i < a.length() ; i++ ){
          int s2integ = Integer.parseInt(a.substring(i,i+1));
          sum += s2integ;
        }
        
        int s_num = Integer.parseInt( a );
        
        if( s_num % sum == 0 )cnt = "Yes";
        else cnt = "No";
            
        System.out.println(cnt);
	  }
} import java.util.*; util.* java public class Main {
	  public static void main(String args[]){
      	Scanner scan = new Scanner(System.in);
            
        String a = scan.next();
        String cnt;
        
        int sum = 0;
        
        for( int i = 0 ; i < a.length() ; i++ ){
          int s2integ = Integer.parseInt(a.substring(i,i+1));
          sum += s2integ;
        }
        
        int s_num = Integer.parseInt( a );
        
        if( s_num % sum == 0 )cnt = "Yes";
        else cnt = "No";
            
        System.out.println(cnt);
	  }
} Main public static void main(String args[]){
      	Scanner scan = new Scanner(System.in);
            
        String a = scan.next();
        String cnt;
        
        int sum = 0;
        
        for( int i = 0 ; i < a.length() ; i++ ){
          int s2integ = Integer.parseInt(a.substring(i,i+1));
          sum += s2integ;
        }
        
        int s_num = Integer.parseInt( a );
        
        if( s_num % sum == 0 )cnt = "Yes";
        else cnt = "No";
            
        System.out.println(cnt);
	  } main {
      	Scanner scan = new Scanner(System.in);
            
        String a = scan.next();
        String cnt;
        
        int sum = 0;
        
        for( int i = 0 ; i < a.length() ; i++ ){
          int s2integ = Integer.parseInt(a.substring(i,i+1));
          sum += s2integ;
        }
        
        int s_num = Integer.parseInt( a );
        
        if( s_num % sum == 0 )cnt = "Yes";
        else cnt = "No";
            
        System.out.println(cnt);
	  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String a = scan.next(); a scan.next() scan.next scan String cnt; cnt int sum = 0; sum 0 for( int i = 0 ; i < a.length() ; i++ ){
          int s2integ = Integer.parseInt(a.substring(i,i+1));
          sum += s2integ;
        } int i = 0 ; int i = 0 ; i 0 i < a.length() i a.length() a.length a i++ i++ i {
          int s2integ = Integer.parseInt(a.substring(i,i+1));
          sum += s2integ;
        } {
          int s2integ = Integer.parseInt(a.substring(i,i+1));
          sum += s2integ;
        } int s2integ = Integer.parseInt(a.substring(i,i+1)); s2integ Integer.parseInt(a.substring(i,i+1)) Integer.parseInt Integer a.substring(i,i+1) a.substring a i i+1 i 1 sum += s2integ sum s2integ int s_num = Integer.parseInt( a ); s_num Integer.parseInt( a ) Integer.parseInt Integer a if( s_num % sum == 0 )cnt = "Yes";
        else cnt = "No"; s_num % sum == 0 s_num % sum s_num sum 0 cnt = "Yes" cnt "Yes" cnt = "No" cnt "No" System.out.println(cnt) System.out.println System.out System System.out cnt String args[] args public class Main {
	  public static void main(String args[]){
      	Scanner scan = new Scanner(System.in);
            
        String a = scan.next();
        String cnt;
        
        int sum = 0;
        
        for( int i = 0 ; i < a.length() ; i++ ){
          int s2integ = Integer.parseInt(a.substring(i,i+1));
          sum += s2integ;
        }
        
        int s_num = Integer.parseInt( a );
        
        if( s_num % sum == 0 )cnt = "Yes";
        else cnt = "No";
            
        System.out.println(cnt);
	  }
} public class Main {
	  public static void main(String args[]){
      	Scanner scan = new Scanner(System.in);
            
        String a = scan.next();
        String cnt;
        
        int sum = 0;
        
        for( int i = 0 ; i < a.length() ; i++ ){
          int s2integ = Integer.parseInt(a.substring(i,i+1));
          sum += s2integ;
        }
        
        int s_num = Integer.parseInt( a );
        
        if( s_num % sum == 0 )cnt = "Yes";
        else cnt = "No";
            
        System.out.println(cnt);
	  }
} Main
import java.util.*;

public class Main {
	  public static void main(String args[]){
      	Scanner scan = new Scanner(System.in);
            
        String a = scan.next();
        String cnt;
        
        int sum = 0;
        
        for( int i = 0 ; i < a.length() ; i++ ){
          int s2integ = Integer.parseInt(a.substring(i,i+1));
          sum += s2integ;
        }
        
        int s_num = Integer.parseInt( a );
        
        if( s_num % sum == 0 )cnt = "Yes";
        else cnt = "No";
            
        System.out.println(cnt);
	  }
}