import java.util.*;

public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        int n = scanner.nextInt();
        int m = n, s = 0;
        while (m != 0) {
            s += m % 10;
            m /= 10;
        }
        System.out.println(n % s == 0 ? "Yes" : "No");
    }
} import java.util.*; util.* java public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        int n = scanner.nextInt();
        int m = n, s = 0;
        while (m != 0) {
            s += m % 10;
            m /= 10;
        }
        System.out.println(n % s == 0 ? "Yes" : "No");
    }
} Main static Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) public static void main(String[]$) {
        int n = scanner.nextInt();
        int m = n, s = 0;
        while (m != 0) {
            s += m % 10;
            m /= 10;
        }
        System.out.println(n % s == 0 ? "Yes" : "No");
    } main {
        int n = scanner.nextInt();
        int m = n, s = 0;
        while (m != 0) {
            s += m % 10;
            m /= 10;
        }
        System.out.println(n % s == 0 ? "Yes" : "No");
    } int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = n m n s = 0; s 0 while (m != 0) {
            s += m % 10;
            m /= 10;
        } m != 0 m 0 {
            s += m % 10;
            m /= 10;
        } s += m % 10 s m % 10 m 10 m /= 10 m 10 System.out.println(n % s == 0 ? "Yes" : "No") System.out.println System.out System System.out n % s == 0 ? "Yes" : "No" n % s == 0 n % s n s 0 "Yes" "No" String[]$ $ public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        int n = scanner.nextInt();
        int m = n, s = 0;
        while (m != 0) {
            s += m % 10;
            m /= 10;
        }
        System.out.println(n % s == 0 ? "Yes" : "No");
    }
} public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        int n = scanner.nextInt();
        int m = n, s = 0;
        while (m != 0) {
            s += m % 10;
            m /= 10;
        }
        System.out.println(n % s == 0 ? "Yes" : "No");
    }
} Main
import java.util.*;

public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        int n = scanner.nextInt();
        int m = n, s = 0;
        while (m != 0) {
            s += m % 10;
            m /= 10;
        }
        System.out.println(n % s == 0 ? "Yes" : "No");
    }
}