import java.util.Scanner;

public class Main {

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

    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        int n = reader.nextInt();
        int s = 0;
        int buf = n;
        while (buf > 0) {
            s += buf % 10;
            buf /= 10;
        }
        System.out.println(n % s == 0 ? "Yes" : "No");
        reader.close();
    }
} Main public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        int n = reader.nextInt();
        int s = 0;
        int buf = n;
        while (buf > 0) {
            s += buf % 10;
            buf /= 10;
        }
        System.out.println(n % s == 0 ? "Yes" : "No");
        reader.close();
    } main {
        Scanner reader = new Scanner(System.in);
        int n = reader.nextInt();
        int s = 0;
        int buf = n;
        while (buf > 0) {
            s += buf % 10;
            buf /= 10;
        }
        System.out.println(n % s == 0 ? "Yes" : "No");
        reader.close();
    } Scanner reader = new Scanner(System.in); reader new Scanner(System.in) int n = reader.nextInt(); n reader.nextInt() reader.nextInt reader int s = 0; s 0 int buf = n; buf n while (buf > 0) {
            s += buf % 10;
            buf /= 10;
        } buf > 0 buf 0 {
            s += buf % 10;
            buf /= 10;
        } s += buf % 10 s buf % 10 buf 10 buf /= 10 buf 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" reader.close() reader.close reader String[] args args public class Main {

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

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

public class Main {

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