import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String NS = String.valueOf(N);
        int l = NS.length();
        int S = 0;
        String s = " ";

        for(int i=0; i<l; i++){
            s = String.valueOf(NS.charAt(i));
            S += Integer.parseInt(s);
        }
        if(N%S==0){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String NS = String.valueOf(N);
        int l = NS.length();
        int S = 0;
        String s = " ";

        for(int i=0; i<l; i++){
            s = String.valueOf(NS.charAt(i));
            S += Integer.parseInt(s);
        }
        if(N%S==0){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String NS = String.valueOf(N);
        int l = NS.length();
        int S = 0;
        String s = " ";

        for(int i=0; i<l; i++){
            s = String.valueOf(NS.charAt(i));
            S += Integer.parseInt(s);
        }
        if(N%S==0){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String NS = String.valueOf(N);
        int l = NS.length();
        int S = 0;
        String s = " ";

        for(int i=0; i<l; i++){
            s = String.valueOf(NS.charAt(i));
            S += Integer.parseInt(s);
        }
        if(N%S==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 String NS = String.valueOf(N); NS String.valueOf(N) String.valueOf String N int l = NS.length(); l NS.length() NS.length NS int S = 0; S 0 String s = " "; s " " for(int i=0; i<l; i++){
            s = String.valueOf(NS.charAt(i));
            S += Integer.parseInt(s);
        } int i=0; int i=0; i 0 i<l i l i++ i++ i {
            s = String.valueOf(NS.charAt(i));
            S += Integer.parseInt(s);
        } {
            s = String.valueOf(NS.charAt(i));
            S += Integer.parseInt(s);
        } s = String.valueOf(NS.charAt(i)) s String.valueOf(NS.charAt(i)) String.valueOf String NS.charAt(i) NS.charAt NS i S += Integer.parseInt(s) S Integer.parseInt(s) Integer.parseInt Integer s if(N%S==0){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        } N%S==0 N%S N S 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 public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String NS = String.valueOf(N);
        int l = NS.length();
        int S = 0;
        String s = " ";

        for(int i=0; i<l; i++){
            s = String.valueOf(NS.charAt(i));
            S += Integer.parseInt(s);
        }
        if(N%S==0){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String NS = String.valueOf(N);
        int l = NS.length();
        int S = 0;
        String s = " ";

        for(int i=0; i<l; i++){
            s = String.valueOf(NS.charAt(i));
            S += Integer.parseInt(s);
        }
        if(N%S==0){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String NS = String.valueOf(N);
        int l = NS.length();
        int S = 0;
        String s = " ";

        for(int i=0; i<l; i++){
            s = String.valueOf(NS.charAt(i));
            S += Integer.parseInt(s);
        }
        if(N%S==0){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
    }
}