import java.util.*;

public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        int cnt = 0;
        for (int i = 0 ; i < s.length() ; i++) {
            cnt += Character.getNumericValue(s.charAt(i));
        }
        System.out.println(n % cnt == 0 ? "Yes" : "No");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        int cnt = 0;
        for (int i = 0 ; i < s.length() ; i++) {
            cnt += Character.getNumericValue(s.charAt(i));
        }
        System.out.println(n % cnt == 0 ? "Yes" : "No");
    }
} Main public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        int cnt = 0;
        for (int i = 0 ; i < s.length() ; i++) {
            cnt += Character.getNumericValue(s.charAt(i));
        }
        System.out.println(n % cnt == 0 ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        int cnt = 0;
        for (int i = 0 ; i < s.length() ; i++) {
            cnt += Character.getNumericValue(s.charAt(i));
        }
        System.out.println(n % cnt == 0 ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int n = Integer.valueOf(s); n Integer.valueOf(s) Integer.valueOf Integer s int cnt = 0; cnt 0 for (int i = 0 ; i < s.length() ; i++) {
            cnt += Character.getNumericValue(s.charAt(i));
        } int i = 0 ; int i = 0 ; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            cnt += Character.getNumericValue(s.charAt(i));
        } {
            cnt += Character.getNumericValue(s.charAt(i));
        } cnt += Character.getNumericValue(s.charAt(i)) cnt Character.getNumericValue(s.charAt(i)) Character.getNumericValue Character s.charAt(i) s.charAt s i System.out.println(n % cnt == 0 ? "Yes" : "No") System.out.println System.out System System.out n % cnt == 0 ? "Yes" : "No" n % cnt == 0 n % cnt n cnt 0 "Yes" "No" String... args args public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        int cnt = 0;
        for (int i = 0 ; i < s.length() ; i++) {
            cnt += Character.getNumericValue(s.charAt(i));
        }
        System.out.println(n % cnt == 0 ? "Yes" : "No");
    }
} public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        int cnt = 0;
        for (int i = 0 ; i < s.length() ; i++) {
            cnt += Character.getNumericValue(s.charAt(i));
        }
        System.out.println(n % cnt == 0 ? "Yes" : "No");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String... args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        int n = Integer.valueOf(s);
        int cnt = 0;
        for (int i = 0 ; i < s.length() ; i++) {
            cnt += Character.getNumericValue(s.charAt(i));
        }
        System.out.println(n % cnt == 0 ? "Yes" : "No");
    }
}