import java.util.*;
class Main{

     public static void main(String []args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum = 0 ;
        int next = n ;
        for(int i = 0 ; next!=0 ; i++){
            int digit = next%10 ;
            sum+=digit ;
             next = next/10 ;
        }
        if(n%sum== 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
     }
} import java.util.*; util.* java class Main{

     public static void main(String []args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum = 0 ;
        int next = n ;
        for(int i = 0 ; next!=0 ; i++){
            int digit = next%10 ;
            sum+=digit ;
             next = next/10 ;
        }
        if(n%sum== 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
     }
} Main public static void main(String []args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum = 0 ;
        int next = n ;
        for(int i = 0 ; next!=0 ; i++){
            int digit = next%10 ;
            sum+=digit ;
             next = next/10 ;
        }
        if(n%sum== 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
     } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum = 0 ;
        int next = n ;
        for(int i = 0 ; next!=0 ; i++){
            int digit = next%10 ;
            sum+=digit ;
             next = next/10 ;
        }
        if(n%sum== 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
     } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int sum = 0 ; sum 0 int next = n ; next n for(int i = 0 ; next!=0 ; i++){
            int digit = next%10 ;
            sum+=digit ;
             next = next/10 ;
        } int i = 0 ; int i = 0 ; i 0 next!=0 next 0 i++ i++ i {
            int digit = next%10 ;
            sum+=digit ;
             next = next/10 ;
        } {
            int digit = next%10 ;
            sum+=digit ;
             next = next/10 ;
        } int digit = next%10 ; digit next%10 next 10 sum+=digit sum digit next = next/10 next next/10 next 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("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" String []args args
import java.util.*;
class Main{

     public static void main(String []args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int sum = 0 ;
        int next = n ;
        for(int i = 0 ; next!=0 ; i++){
            int digit = next%10 ;
            sum+=digit ;
             next = next/10 ;
        }
        if(n%sum== 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
        
     }
}