import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        
        Scanner sc = new Scanner(System.in);
        int baseN = sc.nextInt();
        int n = baseN;
        
        int s = 0;
        while(n > 0){
            s += n % 10;
            n /= 10;
        }
        
        System.out.println(baseN % s == 0 ? "Yes" : "No");
        
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String args[]){
        
        Scanner sc = new Scanner(System.in);
        int baseN = sc.nextInt();
        int n = baseN;
        
        int s = 0;
        while(n > 0){
            s += n % 10;
            n /= 10;
        }
        
        System.out.println(baseN % s == 0 ? "Yes" : "No");
        
    }
} Main public static void main(String args[]){
        
        Scanner sc = new Scanner(System.in);
        int baseN = sc.nextInt();
        int n = baseN;
        
        int s = 0;
        while(n > 0){
            s += n % 10;
            n /= 10;
        }
        
        System.out.println(baseN % s == 0 ? "Yes" : "No");
        
    } main {
        
        Scanner sc = new Scanner(System.in);
        int baseN = sc.nextInt();
        int n = baseN;
        
        int s = 0;
        while(n > 0){
            s += n % 10;
            n /= 10;
        }
        
        System.out.println(baseN % s == 0 ? "Yes" : "No");
        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int baseN = sc.nextInt(); baseN sc.nextInt() sc.nextInt sc int n = baseN; n baseN int s = 0; s 0 while(n > 0){
            s += n % 10;
            n /= 10;
        } n > 0 n 0 {
            s += n % 10;
            n /= 10;
        } s += n % 10 s n % 10 n 10 n /= 10 n 10 System.out.println(baseN % s == 0 ? "Yes" : "No") System.out.println System.out System System.out baseN % s == 0 ? "Yes" : "No" baseN % s == 0 baseN % s baseN s 0 "Yes" "No" String args[] args public class Main{
    public static void main(String args[]){
        
        Scanner sc = new Scanner(System.in);
        int baseN = sc.nextInt();
        int n = baseN;
        
        int s = 0;
        while(n > 0){
            s += n % 10;
            n /= 10;
        }
        
        System.out.println(baseN % s == 0 ? "Yes" : "No");
        
    }
} public class Main{
    public static void main(String args[]){
        
        Scanner sc = new Scanner(System.in);
        int baseN = sc.nextInt();
        int n = baseN;
        
        int s = 0;
        while(n > 0){
            s += n % 10;
            n /= 10;
        }
        
        System.out.println(baseN % s == 0 ? "Yes" : "No");
        
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String args[]){
        
        Scanner sc = new Scanner(System.in);
        int baseN = sc.nextInt();
        int n = baseN;
        
        int s = 0;
        while(n > 0){
            s += n % 10;
            n /= 10;
        }
        
        System.out.println(baseN % s == 0 ? "Yes" : "No");
        
    }
}