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

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(in.readLine());
        int k = 0;
        char[] c = Integer.toString(n).toCharArray();
        for(char t : c) {
        	k += t - '0';
        }
        if(n % k > 0) {
        	System.out.println("No");
        }else {
        	System.out.println("Yes");
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(in.readLine());
        int k = 0;
        char[] c = Integer.toString(n).toCharArray();
        for(char t : c) {
        	k += t - '0';
        }
        if(n % k > 0) {
        	System.out.println("No");
        }else {
        	System.out.println("Yes");
        }
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(in.readLine());
        int k = 0;
        char[] c = Integer.toString(n).toCharArray();
        for(char t : c) {
        	k += t - '0';
        }
        if(n % k > 0) {
        	System.out.println("No");
        }else {
        	System.out.println("Yes");
        }
    } main {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(in.readLine());
        int k = 0;
        char[] c = Integer.toString(n).toCharArray();
        for(char t : c) {
        	k += t - '0';
        }
        if(n % k > 0) {
        	System.out.println("No");
        }else {
        	System.out.println("Yes");
        }
    } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(in.readLine()); n Integer.parseInt(in.readLine()) Integer.parseInt Integer in.readLine() in.readLine in int k = 0; k 0 char[] c = Integer.toString(n).toCharArray(); c Integer.toString(n).toCharArray() Integer.toString(n).toCharArray Integer.toString(n) Integer.toString Integer n for(char t : c) {
        	k += t - '0';
        } char t c {
        	k += t - '0';
        } {
        	k += t - '0';
        } k += t - '0' k t - '0' t '0' if(n % k > 0) {
        	System.out.println("No");
        }else {
        	System.out.println("Yes");
        } n % k > 0 n % k n k 0 {
        	System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" {
        	System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(in.readLine());
        int k = 0;
        char[] c = Integer.toString(n).toCharArray();
        for(char t : c) {
        	k += t - '0';
        }
        if(n % k > 0) {
        	System.out.println("No");
        }else {
        	System.out.println("Yes");
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(in.readLine());
        int k = 0;
        char[] c = Integer.toString(n).toCharArray();
        for(char t : c) {
        	k += t - '0';
        }
        if(n % k > 0) {
        	System.out.println("No");
        }else {
        	System.out.println("Yes");
        }
    }
} Main
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(in.readLine());
        int k = 0;
        char[] c = Integer.toString(n).toCharArray();
        for(char t : c) {
        	k += t - '0';
        }
        if(n % k > 0) {
        	System.out.println("No");
        }else {
        	System.out.println("Yes");
        }
    }
}