import java.util.Scanner;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= String.valueOf(N).length(); i++) {
            ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1);
        }
        if (N % ans == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= String.valueOf(N).length(); i++) {
            ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1);
        }
        if (N % ans == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= String.valueOf(N).length(); i++) {
            ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1);
        }
        if (N % ans == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } solve {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= String.valueOf(N).length(); i++) {
            ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1);
        }
        if (N % ans == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for (int i = 1; i <= String.valueOf(N).length(); i++) {
            ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1);
        } int i = 1; int i = 1; i 1 i <= String.valueOf(N).length() i String.valueOf(N).length() String.valueOf(N).length String.valueOf(N) String.valueOf String N i++ i++ i {
            ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1);
        } {
            ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1);
        } ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1) ans N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1) N % (int) Math.pow(10, i) N (int) Math.pow(10, i) Math.pow Math 10 i (int) Math.pow(10, i - 1) Math.pow Math 10 i - 1 i 1 if (N % ans == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } N % ans == 0 N % ans N ans 0 {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= String.valueOf(N).length(); i++) {
            ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1);
        }
        if (N % ans == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= String.valueOf(N).length(); i++) {
            ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1);
        }
        if (N % ans == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main
import java.util.Scanner;
import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
        new Main().solve();
    }

    void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int ans = 0;
        for (int i = 1; i <= String.valueOf(N).length(); i++) {
            ans += N % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1);
        }
        if (N % ans == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}