import java.util.Scanner;

public class Main {
    private static int digitSum(int input) {
        int output = 0;
        int tmp = 1;
        while (tmp <= input) {
            output += (input / tmp) % 10;
            tmp *= 10;
        }
        return output;
    }

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

        String res = (val % digitSum(val) == 0) ? "Yes" : "No";
        System.out.println(res);

    }
} import java.util.Scanner; Scanner java.util public class Main {
    private static int digitSum(int input) {
        int output = 0;
        int tmp = 1;
        while (tmp <= input) {
            output += (input / tmp) % 10;
            tmp *= 10;
        }
        return output;
    }

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

        String res = (val % digitSum(val) == 0) ? "Yes" : "No";
        System.out.println(res);

    }
} Main private static int digitSum(int input) {
        int output = 0;
        int tmp = 1;
        while (tmp <= input) {
            output += (input / tmp) % 10;
            tmp *= 10;
        }
        return output;
    } digitSum {
        int output = 0;
        int tmp = 1;
        while (tmp <= input) {
            output += (input / tmp) % 10;
            tmp *= 10;
        }
        return output;
    } int output = 0; output 0 int tmp = 1; tmp 1 while (tmp <= input) {
            output += (input / tmp) % 10;
            tmp *= 10;
        } tmp <= input tmp input {
            output += (input / tmp) % 10;
            tmp *= 10;
        } output += (input / tmp) % 10 output (input / tmp) % 10 (input / tmp) input tmp 10 tmp *= 10 tmp 10 return output; output int input input public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int val = sc.nextInt();

        String res = (val % digitSum(val) == 0) ? "Yes" : "No";
        System.out.println(res);

    } main {
        Scanner sc = new Scanner(System.in);
        int val = sc.nextInt();

        String res = (val % digitSum(val) == 0) ? "Yes" : "No";
        System.out.println(res);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int val = sc.nextInt(); val sc.nextInt() sc.nextInt sc String res = (val % digitSum(val) == 0) ? "Yes" : "No"; res (val % digitSum(val) == 0) ? "Yes" : "No" (val % digitSum(val) == 0) val % digitSum(val) val digitSum(val) digitSum val 0 "Yes" "No" System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    private static int digitSum(int input) {
        int output = 0;
        int tmp = 1;
        while (tmp <= input) {
            output += (input / tmp) % 10;
            tmp *= 10;
        }
        return output;
    }

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

        String res = (val % digitSum(val) == 0) ? "Yes" : "No";
        System.out.println(res);

    }
} public class Main {
    private static int digitSum(int input) {
        int output = 0;
        int tmp = 1;
        while (tmp <= input) {
            output += (input / tmp) % 10;
            tmp *= 10;
        }
        return output;
    }

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

        String res = (val % digitSum(val) == 0) ? "Yes" : "No";
        System.out.println(res);

    }
} Main
import java.util.Scanner;

public class Main {
    private static int digitSum(int input) {
        int output = 0;
        int tmp = 1;
        while (tmp <= input) {
            output += (input / tmp) % 10;
            tmp *= 10;
        }
        return output;
    }

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

        String res = (val % digitSum(val) == 0) ? "Yes" : "No";
        System.out.println(res);

    }
}
