import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * 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;
        InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int sum = 0;
            int tmp = n;
            while (tmp > 0) {
                sum += tmp % 10;
                tmp /= 10;
            }

            out.println(n % sum == 0 ? "Yes" : "No");
        }

    }

    static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
            st = new StringTokenizer("");
        }

        public String nextString() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

    }
}
 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.StringTokenizer; StringTokenizer java.util import java.io.IOException; IOException java.io import java.util.InputMismatchException; InputMismatchException java.util import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.InputStream; InputStream java.io public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int sum = 0;
            int tmp = n;
            while (tmp > 0) {
                sum += tmp % 10;
                tmp /= 10;
            }

            out.println(n % sum == 0 ? "Yes" : "No");
        }

    }

    static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
            st = new StringTokenizer("");
        }

        public String nextString() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(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;
        InputReader in = new InputReader(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 InputReader in = new InputReader(inputStream); in new InputReader(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, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int sum = 0;
            int tmp = n;
            while (tmp > 0) {
                sum += tmp % 10;
                tmp /= 10;
            }

            out.println(n % sum == 0 ? "Yes" : "No");
        }

    } BDigitSums public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int sum = 0;
            int tmp = n;
            while (tmp > 0) {
                sum += tmp % 10;
                tmp /= 10;
            }

            out.println(n % sum == 0 ? "Yes" : "No");
        } solve {
            int n = in.nextInt();
            int sum = 0;
            int tmp = n;
            while (tmp > 0) {
                sum += tmp % 10;
                tmp /= 10;
            }

            out.println(n % sum == 0 ? "Yes" : "No");
        } int n = in.nextInt(); n in.nextInt() in.nextInt in int sum = 0; sum 0 int tmp = n; tmp n while (tmp > 0) {
                sum += tmp % 10;
                tmp /= 10;
            } tmp > 0 tmp 0 {
                sum += tmp % 10;
                tmp /= 10;
            } sum += tmp % 10 sum tmp % 10 tmp 10 tmp /= 10 tmp 10 out.println(n % sum == 0 ? "Yes" : "No") out.println out n % sum == 0 ? "Yes" : "No" n % sum == 0 n % sum n sum 0 "Yes" "No" int testNumber testNumber InputReader in in PrintWriter out out static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
            st = new StringTokenizer("");
        }

        public String nextString() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

    } InputReader private BufferedReader br; br private StringTokenizer st; st public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
            st = new StringTokenizer("");
        } InputReader {
            br = new BufferedReader(new InputStreamReader(inputStream));
            st = new StringTokenizer("");
        } br = new BufferedReader(new InputStreamReader(inputStream)) br new BufferedReader(new InputStreamReader(inputStream)) st = new StringTokenizer("") st new StringTokenizer("") InputStream inputStream inputStream public String nextString() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return st.nextToken();
        } nextString {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return st.nextToken();
        } while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            } !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            } try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                } catch (IOException e) {
                    throw new InputMismatchException();
                } IOException e {
                    throw new InputMismatchException();
                } throw new InputMismatchException(); new InputMismatchException() {
                    st = new StringTokenizer(br.readLine(), " ");
                } st = new StringTokenizer(br.readLine(), " ") st new StringTokenizer(br.readLine(), " ") return st.nextToken(); st.nextToken() st.nextToken st public int nextInt() {
            return Integer.parseInt(nextString());
        } nextInt {
            return Integer.parseInt(nextString());
        } return Integer.parseInt(nextString()); Integer.parseInt(nextString()) Integer.parseInt Integer nextString() nextString public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int sum = 0;
            int tmp = n;
            while (tmp > 0) {
                sum += tmp % 10;
                tmp /= 10;
            }

            out.println(n % sum == 0 ? "Yes" : "No");
        }

    }

    static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
            st = new StringTokenizer("");
        }

        public String nextString() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int sum = 0;
            int tmp = n;
            while (tmp > 0) {
                sum += tmp % 10;
                tmp /= 10;
            }

            out.println(n % sum == 0 ? "Yes" : "No");
        }

    }

    static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
            st = new StringTokenizer("");
        }

        public String nextString() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * 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;
        InputReader in = new InputReader(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, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int sum = 0;
            int tmp = n;
            while (tmp > 0) {
                sum += tmp % 10;
                tmp /= 10;
            }

            out.println(n % sum == 0 ? "Yes" : "No");
        }

    }

    static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
            st = new StringTokenizer("");
        }

        public String nextString() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

    }
}

