import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        int x = 0;
        long n = N;
        while(n > 0) {
            x += n % 10;
            n /= 10;
        }
        if(N % x == 0) System.out.println("Yes");
        else System.out.println("No");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        int x = 0;
        long n = N;
        while(n > 0) {
            x += n % 10;
            n /= 10;
        }
        if(N % x == 0) System.out.println("Yes");
        else System.out.println("No");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        int x = 0;
        long n = N;
        while(n > 0) {
            x += n % 10;
            n /= 10;
        }
        if(N % x == 0) System.out.println("Yes");
        else System.out.println("No");
    } main {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        int x = 0;
        long n = N;
        while(n > 0) {
            x += n % 10;
            n /= 10;
        }
        if(N % x == 0) System.out.println("Yes");
        else System.out.println("No");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = Long.parseLong(sc.next()); N Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc int x = 0; x 0 long n = N; n N while(n > 0) {
            x += n % 10;
            n /= 10;
        } n > 0 n 0 {
            x += n % 10;
            n /= 10;
        } x += n % 10 x n % 10 n 10 n /= 10 n 10 if(N % x == 0) System.out.println("Yes");
        else System.out.println("No"); N % x == 0 N % x N x 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        int x = 0;
        long n = N;
        while(n > 0) {
            x += n % 10;
            n /= 10;
        }
        if(N % x == 0) System.out.println("Yes");
        else System.out.println("No");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        int x = 0;
        long n = N;
        while(n > 0) {
            x += n % 10;
            n /= 10;
        }
        if(N % x == 0) System.out.println("Yes");
        else System.out.println("No");
    }
} Main
import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long N = Long.parseLong(sc.next());
        int x = 0;
        long n = N;
        while(n > 0) {
            x += n % 10;
            n /= 10;
        }
        if(N % x == 0) System.out.println("Yes");
        else System.out.println("No");
    }
}
