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
 */
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);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            String N = in.next();

            int n = Integer.valueOf(N);
            int s = 0;

            for (int i = 0; i < N.length(); i++) {
                s += Integer.valueOf(N.charAt(i) - 48);
            }

            if (n % s == 0) {
                out.println("Yes");
            } else {
                out.println("No");
            }
            return;

        }

    }
}
 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);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            String N = in.next();

            int n = Integer.valueOf(N);
            int s = 0;

            for (int i = 0; i < N.length(); i++) {
                s += Integer.valueOf(N.charAt(i) - 48);
            }

            if (n % s == 0) {
                out.println("Yes");
            } else {
                out.println("No");
            }
            return;

        }

    }
} 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);
        B solver = new B();
        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);
        B solver = new B();
        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) B solver = new B(); solver new B() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            String N = in.next();

            int n = Integer.valueOf(N);
            int s = 0;

            for (int i = 0; i < N.length(); i++) {
                s += Integer.valueOf(N.charAt(i) - 48);
            }

            if (n % s == 0) {
                out.println("Yes");
            } else {
                out.println("No");
            }
            return;

        }

    } B public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            String N = in.next();

            int n = Integer.valueOf(N);
            int s = 0;

            for (int i = 0; i < N.length(); i++) {
                s += Integer.valueOf(N.charAt(i) - 48);
            }

            if (n % s == 0) {
                out.println("Yes");
            } else {
                out.println("No");
            }
            return;

        } solve {
            // 入力
            String N = in.next();

            int n = Integer.valueOf(N);
            int s = 0;

            for (int i = 0; i < N.length(); i++) {
                s += Integer.valueOf(N.charAt(i) - 48);
            }

            if (n % s == 0) {
                out.println("Yes");
            } else {
                out.println("No");
            }
            return;

        } String N = in.next(); N in.next() in.next in int n = Integer.valueOf(N); n Integer.valueOf(N) Integer.valueOf Integer N int s = 0; s 0 for (int i = 0; i < N.length(); i++) {
                s += Integer.valueOf(N.charAt(i) - 48);
            } int i = 0; int i = 0; i 0 i < N.length() i N.length() N.length N i++ i++ i {
                s += Integer.valueOf(N.charAt(i) - 48);
            } {
                s += Integer.valueOf(N.charAt(i) - 48);
            } s += Integer.valueOf(N.charAt(i) - 48) s Integer.valueOf(N.charAt(i) - 48) Integer.valueOf Integer N.charAt(i) - 48 N.charAt(i) N.charAt N i 48 if (n % s == 0) {
                out.println("Yes");
            } else {
                out.println("No");
            } n % s == 0 n % s n s 0 {
                out.println("Yes");
            } out.println("Yes") out.println out "Yes" {
                out.println("No");
            } out.println("No") out.println out "No" return; 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);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            String N = in.next();

            int n = Integer.valueOf(N);
            int s = 0;

            for (int i = 0; i < N.length(); i++) {
                s += Integer.valueOf(N.charAt(i) - 48);
            }

            if (n % s == 0) {
                out.println("Yes");
            } else {
                out.println("No");
            }
            return;

        }

    }
} 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);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            String N = in.next();

            int n = Integer.valueOf(N);
            int s = 0;

            for (int i = 0; i < N.length(); i++) {
                s += Integer.valueOf(N.charAt(i) - 48);
            }

            if (n % s == 0) {
                out.println("Yes");
            } else {
                out.println("No");
            }
            return;

        }

    }
} 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
 */
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);
        B solver = new B();
        solver.solve(1, in, out);
        out.close();
    }

    static class B {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            String N = in.next();

            int n = Integer.valueOf(N);
            int s = 0;

            for (int i = 0; i < N.length(); i++) {
                s += Integer.valueOf(N.charAt(i) - 48);
            }

            if (n % s == 0) {
                out.println("Yes");
            } else {
                out.println("No");
            }
            return;

        }

    }
}

