

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public final class Main {

    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = Integer.parseInt(in.nextLine());
        int sum = 0;
        int copy = n;
        while (copy > 0) {
            sum += copy % 10;
            copy /= 10;
        }
        System.out.println(n % sum == 0 ? "Yes" : "No");
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public final class Main {

    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = Integer.parseInt(in.nextLine());
        int sum = 0;
        int copy = n;
        while (copy > 0) {
            sum += copy % 10;
            copy /= 10;
        }
        System.out.println(n % sum == 0 ? "Yes" : "No");
    }
} Main public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = Integer.parseInt(in.nextLine());
        int sum = 0;
        int copy = n;
        while (copy > 0) {
            sum += copy % 10;
            copy /= 10;
        }
        System.out.println(n % sum == 0 ? "Yes" : "No");
    } main {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = Integer.parseInt(in.nextLine());
        int sum = 0;
        int copy = n;
        while (copy > 0) {
            sum += copy % 10;
            copy /= 10;
        }
        System.out.println(n % sum == 0 ? "Yes" : "No");
    } final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); in new Scanner(new BufferedReader(new InputStreamReader(System.in))) final int n = Integer.parseInt(in.nextLine()); n Integer.parseInt(in.nextLine()) Integer.parseInt Integer in.nextLine() in.nextLine in int sum = 0; sum 0 int copy = n; copy n while (copy > 0) {
            sum += copy % 10;
            copy /= 10;
        } copy > 0 copy 0 {
            sum += copy % 10;
            copy /= 10;
        } sum += copy % 10 sum copy % 10 copy 10 copy /= 10 copy 10 System.out.println(n % sum == 0 ? "Yes" : "No") System.out.println System.out System System.out n % sum == 0 ? "Yes" : "No" n % sum == 0 n % sum n sum 0 "Yes" "No" String[] args args public final class Main {

    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = Integer.parseInt(in.nextLine());
        int sum = 0;
        int copy = n;
        while (copy > 0) {
            sum += copy % 10;
            copy /= 10;
        }
        System.out.println(n % sum == 0 ? "Yes" : "No");
    }
} public final class Main {

    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = Integer.parseInt(in.nextLine());
        int sum = 0;
        int copy = n;
        while (copy > 0) {
            sum += copy % 10;
            copy /= 10;
        }
        System.out.println(n % sum == 0 ? "Yes" : "No");
    }
} Main


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public final class Main {

    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = Integer.parseInt(in.nextLine());
        int sum = 0;
        int copy = n;
        while (copy > 0) {
            sum += copy % 10;
            copy /= 10;
        }
        System.out.println(n % sum == 0 ? "Yes" : "No");
    }
}
