import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        System.out.println(N % s(N) == 0 ? "Yes" : "No");
    }

    private static int s(int n) {
        int s = 0;
        while (n > 0) {
            s += n % 10;
            n /= 10;
        }
        return s;
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        System.out.println(N % s(N) == 0 ? "Yes" : "No");
    }

    private static int s(int n) {
        int s = 0;
        while (n > 0) {
            s += n % 10;
            n /= 10;
        }
        return s;
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        System.out.println(N % s(N) == 0 ? "Yes" : "No");
    } main {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        System.out.println(N % s(N) == 0 ? "Yes" : "No");
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in System.out.println(N % s(N) == 0 ? "Yes" : "No") System.out.println System.out System System.out N % s(N) == 0 ? "Yes" : "No" N % s(N) == 0 N % s(N) N s(N) s N 0 "Yes" "No" String[] args args private static int s(int n) {
        int s = 0;
        while (n > 0) {
            s += n % 10;
            n /= 10;
        }
        return s;
    } s {
        int s = 0;
        while (n > 0) {
            s += n % 10;
            n /= 10;
        }
        return s;
    } int s = 0; s 0 while (n > 0) {
            s += n % 10;
            n /= 10;
        } n > 0 n 0 {
            s += n % 10;
            n /= 10;
        } s += n % 10 s n % 10 n 10 n /= 10 n 10 return s; s int n n public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        System.out.println(N % s(N) == 0 ? "Yes" : "No");
    }

    private static int s(int n) {
        int s = 0;
        while (n > 0) {
            s += n % 10;
            n /= 10;
        }
        return s;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        System.out.println(N % s(N) == 0 ? "Yes" : "No");
    }

    private static int s(int n) {
        int s = 0;
        while (n > 0) {
            s += n % 10;
            n /= 10;
        }
        return s;
    }
} Main
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        System.out.println(N % s(N) == 0 ? "Yes" : "No");
    }

    private static int s(int n) {
        int s = 0;
        while (n > 0) {
            s += n % 10;
            n /= 10;
        }
        return s;
    }
}