import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Eric
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDigitSums solver = new BDigitSums();
        solver.solve(1, in, out);
        out.close();
    }

    static class BDigitSums {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int max = (int) Math.sqrt(N) + 1;
            int sn = 0;
            String s = "" + N;
            for (int i = 0; i < s.length(); i++) {
                sn += Integer.parseInt("" + s.charAt(i));
            }
            out.println(N % sn == 0 ? "Yes" : "No");
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDigitSums solver = new BDigitSums();
        solver.solve(1, in, out);
        out.close();
    }

    static class BDigitSums {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int max = (int) Math.sqrt(N) + 1;
            int sn = 0;
            String s = "" + N;
            for (int i = 0; i < s.length(); i++) {
                sn += Integer.parseInt("" + s.charAt(i));
            }
            out.println(N % sn == 0 ? "Yes" : "No");
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDigitSums solver = new BDigitSums();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDigitSums solver = new BDigitSums();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) BDigitSums solver = new BDigitSums(); solver new BDigitSums() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class BDigitSums {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int max = (int) Math.sqrt(N) + 1;
            int sn = 0;
            String s = "" + N;
            for (int i = 0; i < s.length(); i++) {
                sn += Integer.parseInt("" + s.charAt(i));
            }
            out.println(N % sn == 0 ? "Yes" : "No");
        }

    } BDigitSums public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int max = (int) Math.sqrt(N) + 1;
            int sn = 0;
            String s = "" + N;
            for (int i = 0; i < s.length(); i++) {
                sn += Integer.parseInt("" + s.charAt(i));
            }
            out.println(N % sn == 0 ? "Yes" : "No");
        } solve {
            int N = in.nextInt();
            int max = (int) Math.sqrt(N) + 1;
            int sn = 0;
            String s = "" + N;
            for (int i = 0; i < s.length(); i++) {
                sn += Integer.parseInt("" + s.charAt(i));
            }
            out.println(N % sn == 0 ? "Yes" : "No");
        } int N = in.nextInt(); N in.nextInt() in.nextInt in int max = (int) Math.sqrt(N) + 1; max (int) Math.sqrt(N) + 1 (int) Math.sqrt(N) Math.sqrt Math N 1 int sn = 0; sn 0 String s = "" + N; s "" + N "" N for (int i = 0; i < s.length(); i++) {
                sn += Integer.parseInt("" + s.charAt(i));
            } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
                sn += Integer.parseInt("" + s.charAt(i));
            } {
                sn += Integer.parseInt("" + s.charAt(i));
            } sn += Integer.parseInt("" + s.charAt(i)) sn Integer.parseInt("" + s.charAt(i)) Integer.parseInt Integer "" + s.charAt(i) "" s.charAt(i) s.charAt s i out.println(N % sn == 0 ? "Yes" : "No") out.println out N % sn == 0 ? "Yes" : "No" N % sn == 0 N % sn N sn 0 "Yes" "No" int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDigitSums solver = new BDigitSums();
        solver.solve(1, in, out);
        out.close();
    }

    static class BDigitSums {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int max = (int) Math.sqrt(N) + 1;
            int sn = 0;
            String s = "" + N;
            for (int i = 0; i < s.length(); i++) {
                sn += Integer.parseInt("" + s.charAt(i));
            }
            out.println(N % sn == 0 ? "Yes" : "No");
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDigitSums solver = new BDigitSums();
        solver.solve(1, in, out);
        out.close();
    }

    static class BDigitSums {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int max = (int) Math.sqrt(N) + 1;
            int sn = 0;
            String s = "" + N;
            for (int i = 0; i < s.length(); i++) {
                sn += Integer.parseInt("" + s.charAt(i));
            }
            out.println(N % sn == 0 ? "Yes" : "No");
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Eric
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDigitSums solver = new BDigitSums();
        solver.solve(1, in, out);
        out.close();
    }

    static class BDigitSums {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            int max = (int) Math.sqrt(N) + 1;
            int sn = 0;
            String s = "" + N;
            for (int i = 0; i < s.length(); i++) {
                sn += Integer.parseInt("" + s.charAt(i));
            }
            out.println(N % sn == 0 ? "Yes" : "No");
        }

    }
}

