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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());

        int x = n;


        int num = 0;
        while(x > 0){
            num += x % 10;
            x /= 10;
        }
        
        if(n % num == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        sc.close();
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());

        int x = n;


        int num = 0;
        while(x > 0){
            num += x % 10;
            x /= 10;
        }
        
        if(n % num == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());

        int x = n;


        int num = 0;
        while(x > 0){
            num += x % 10;
            x /= 10;
        }
        
        if(n % num == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());

        int x = n;


        int num = 0;
        while(x > 0){
            num += x % 10;
            x /= 10;
        }
        
        if(n % num == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int x = n; x n int num = 0; num 0 while(x > 0){
            num += x % 10;
            x /= 10;
        } x > 0 x 0 {
            num += x % 10;
            x /= 10;
        } num += x % 10 num x % 10 x 10 x /= 10 x 10 if(n % num == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } n % num == 0 n % num n num 0 {
            System.out.println("Yes");
        } System.out.println("Yes") System.out.println System.out System System.out "Yes" {
            System.out.println("No");
        } System.out.println("No") System.out.println System.out System System.out "No" sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());

        int x = n;


        int num = 0;
        while(x > 0){
            num += x % 10;
            x /= 10;
        }
        
        if(n % num == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());

        int x = n;


        int num = 0;
        while(x > 0){
            num += x % 10;
            x /= 10;
        }
        
        if(n % num == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        sc.close();
    }
} Main
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());

        int x = n;


        int num = 0;
        while(x > 0){
            num += x % 10;
            x /= 10;
        }
        
        if(n % num == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

        sc.close();
    }
}