import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        int n;

        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();

        String strn = String.valueOf(n);
        int len = strn.length();

        String ans;
        int sum = 0;
        for (int i = 0; i < len; i++) {
            sum += Integer.parseInt(strn.substring(i, i + 1));
        }
        if (n % sum == 0) ans = "Yes";
        else ans = "No";

        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        int n;

        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();

        String strn = String.valueOf(n);
        int len = strn.length();

        String ans;
        int sum = 0;
        for (int i = 0; i < len; i++) {
            sum += Integer.parseInt(strn.substring(i, i + 1));
        }
        if (n % sum == 0) ans = "Yes";
        else ans = "No";

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        int n;

        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();

        String strn = String.valueOf(n);
        int len = strn.length();

        String ans;
        int sum = 0;
        for (int i = 0; i < len; i++) {
            sum += Integer.parseInt(strn.substring(i, i + 1));
        }
        if (n % sum == 0) ans = "Yes";
        else ans = "No";

        System.out.println(ans);
    } main {
        int n;

        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();

        String strn = String.valueOf(n);
        int len = strn.length();

        String ans;
        int sum = 0;
        for (int i = 0; i < len; i++) {
            sum += Integer.parseInt(strn.substring(i, i + 1));
        }
        if (n % sum == 0) ans = "Yes";
        else ans = "No";

        System.out.println(ans);
    } int n; n Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = sc.nextInt() n sc.nextInt() sc.nextInt sc String strn = String.valueOf(n); strn String.valueOf(n) String.valueOf String n int len = strn.length(); len strn.length() strn.length strn String ans; ans int sum = 0; sum 0 for (int i = 0; i < len; i++) {
            sum += Integer.parseInt(strn.substring(i, i + 1));
        } int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
            sum += Integer.parseInt(strn.substring(i, i + 1));
        } {
            sum += Integer.parseInt(strn.substring(i, i + 1));
        } sum += Integer.parseInt(strn.substring(i, i + 1)) sum Integer.parseInt(strn.substring(i, i + 1)) Integer.parseInt Integer strn.substring(i, i + 1) strn.substring strn i i + 1 i 1 if (n % sum == 0) ans = "Yes";
        else ans = "No"; n % sum == 0 n % sum n sum 0 ans = "Yes" ans "Yes" ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {
        int n;

        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();

        String strn = String.valueOf(n);
        int len = strn.length();

        String ans;
        int sum = 0;
        for (int i = 0; i < len; i++) {
            sum += Integer.parseInt(strn.substring(i, i + 1));
        }
        if (n % sum == 0) ans = "Yes";
        else ans = "No";

        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        int n;

        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();

        String strn = String.valueOf(n);
        int len = strn.length();

        String ans;
        int sum = 0;
        for (int i = 0; i < len; i++) {
            sum += Integer.parseInt(strn.substring(i, i + 1));
        }
        if (n % sum == 0) ans = "Yes";
        else ans = "No";

        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        int n;

        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();

        String strn = String.valueOf(n);
        int len = strn.length();

        String ans;
        int sum = 0;
        for (int i = 0; i < len; i++) {
            sum += Integer.parseInt(strn.substring(i, i + 1));
        }
        if (n % sum == 0) ans = "Yes";
        else ans = "No";

        System.out.println(ans);
    }
}