import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int digitSum = digitSum(n);
        boolean res = (n % digitSum == 0);

        System.out.println(res ? "Yes" : "No");
    }

    private static int digitSum(int n) {
        int sum = 0;

        while (n > 0) {
            sum += n % 10;
            n /= 10;
        }

        return sum;
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int digitSum = digitSum(n);
        boolean res = (n % digitSum == 0);

        System.out.println(res ? "Yes" : "No");
    }

    private static int digitSum(int n) {
        int sum = 0;

        while (n > 0) {
            sum += n % 10;
            n /= 10;
        }

        return sum;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int digitSum = digitSum(n);
        boolean res = (n % digitSum == 0);

        System.out.println(res ? "Yes" : "No");
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int digitSum = digitSum(n);
        boolean res = (n % digitSum == 0);

        System.out.println(res ? "Yes" : "No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int digitSum = digitSum(n); digitSum digitSum(n) digitSum n boolean res = (n % digitSum == 0); res (n % digitSum == 0) n % digitSum n digitSum 0 System.out.println(res ? "Yes" : "No") System.out.println System.out System System.out res ? "Yes" : "No" res "Yes" "No" String[] args args private static int digitSum(int n) {
        int sum = 0;

        while (n > 0) {
            sum += n % 10;
            n /= 10;
        }

        return sum;
    } digitSum {
        int sum = 0;

        while (n > 0) {
            sum += n % 10;
            n /= 10;
        }

        return sum;
    } int sum = 0; sum 0 while (n > 0) {
            sum += n % 10;
            n /= 10;
        } n > 0 n 0 {
            sum += n % 10;
            n /= 10;
        } sum += n % 10 sum n % 10 n 10 n /= 10 n 10 return sum; sum int n n public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int digitSum = digitSum(n);
        boolean res = (n % digitSum == 0);

        System.out.println(res ? "Yes" : "No");
    }

    private static int digitSum(int n) {
        int sum = 0;

        while (n > 0) {
            sum += n % 10;
            n /= 10;
        }

        return sum;
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int digitSum = digitSum(n);
        boolean res = (n % digitSum == 0);

        System.out.println(res ? "Yes" : "No");
    }

    private static int digitSum(int n) {
        int sum = 0;

        while (n > 0) {
            sum += n % 10;
            n /= 10;
        }

        return sum;
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        int digitSum = digitSum(n);
        boolean res = (n % digitSum == 0);

        System.out.println(res ? "Yes" : "No");
    }

    private static int digitSum(int n) {
        int sum = 0;

        while (n > 0) {
            sum += n % 10;
            n /= 10;
        }

        return sum;
    }
}
