import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int backUp = N;
        int ans = 0;
        while(N!=0){
            ans += N%10;
            N = N/10;
        }
        String t="Yes";
        if(backUp%ans!=0) t="No";
        System.out.println(t);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int backUp = N;
        int ans = 0;
        while(N!=0){
            ans += N%10;
            N = N/10;
        }
        String t="Yes";
        if(backUp%ans!=0) t="No";
        System.out.println(t);
    }
} Main public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int backUp = N;
        int ans = 0;
        while(N!=0){
            ans += N%10;
            N = N/10;
        }
        String t="Yes";
        if(backUp%ans!=0) t="No";
        System.out.println(t);
    } main {

        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int backUp = N;
        int ans = 0;
        while(N!=0){
            ans += N%10;
            N = N/10;
        }
        String t="Yes";
        if(backUp%ans!=0) t="No";
        System.out.println(t);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int backUp = N; backUp N int ans = 0; ans 0 while(N!=0){
            ans += N%10;
            N = N/10;
        } N!=0 N 0 {
            ans += N%10;
            N = N/10;
        } ans += N%10 ans N%10 N 10 N = N/10 N N/10 N 10 String t="Yes"; t "Yes" if(backUp%ans!=0) t="No"; backUp%ans!=0 backUp%ans backUp ans 0 t="No" t "No" System.out.println(t) System.out.println System.out System System.out t String[] args args public class Main {
    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int backUp = N;
        int ans = 0;
        while(N!=0){
            ans += N%10;
            N = N/10;
        }
        String t="Yes";
        if(backUp%ans!=0) t="No";
        System.out.println(t);
    }
} public class Main {
    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int backUp = N;
        int ans = 0;
        while(N!=0){
            ans += N%10;
            N = N/10;
        }
        String t="Yes";
        if(backUp%ans!=0) t="No";
        System.out.println(t);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int backUp = N;
        int ans = 0;
        while(N!=0){
            ans += N%10;
            N = N/10;
        }
        String t="Yes";
        if(backUp%ans!=0) t="No";
        System.out.println(t);
    }
}