import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        long n = Long.parseLong(s);

        long fact = 0;
        for (int i = 0; i < s.length(); i++) {
            fact += s.charAt(i) - '0';
        }
        if (n % fact == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} import java.util.*; util.* java class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        long n = Long.parseLong(s);

        long fact = 0;
        for (int i = 0; i < s.length(); i++) {
            fact += s.charAt(i) - '0';
        }
        if (n % fact == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        long n = Long.parseLong(s);

        long fact = 0;
        for (int i = 0; i < s.length(); i++) {
            fact += s.charAt(i) - '0';
        }
        if (n % fact == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } main {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        long n = Long.parseLong(s);

        long fact = 0;
        for (int i = 0; i < s.length(); i++) {
            fact += s.charAt(i) - '0';
        }
        if (n % fact == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.nextLine(); s scanner.nextLine() scanner.nextLine scanner long n = Long.parseLong(s); n Long.parseLong(s) Long.parseLong Long s long fact = 0; fact 0 for (int i = 0; i < s.length(); i++) {
            fact += s.charAt(i) - '0';
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            fact += s.charAt(i) - '0';
        } {
            fact += s.charAt(i) - '0';
        } fact += s.charAt(i) - '0' fact s.charAt(i) - '0' s.charAt(i) s.charAt s i '0' if (n % fact == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        } n % fact == 0 n % fact n fact 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" String[] args args
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        long n = Long.parseLong(s);

        long fact = 0;
        for (int i = 0; i < s.length(); i++) {
            fact += s.charAt(i) - '0';
        }
        if (n % fact == 0) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}
