import java.io.*;

public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String N = br.readLine();
        String[] array = N.split("");
        int calc = 0;
        int[] num = new int[array.length];
        for(int i = 0;i<array.length;i++){
            num[i] = Integer.parseInt(array[i]);
            calc += num[i];
        }
        int Nn;
        Nn = Integer.parseInt(N);
        if(Nn%calc == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }


    }
} import java.io.*; io.* java public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String N = br.readLine();
        String[] array = N.split("");
        int calc = 0;
        int[] num = new int[array.length];
        for(int i = 0;i<array.length;i++){
            num[i] = Integer.parseInt(array[i]);
            calc += num[i];
        }
        int Nn;
        Nn = Integer.parseInt(N);
        if(Nn%calc == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }


    }
} Main public static void main(String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String N = br.readLine();
        String[] array = N.split("");
        int calc = 0;
        int[] num = new int[array.length];
        for(int i = 0;i<array.length;i++){
            num[i] = Integer.parseInt(array[i]);
            calc += num[i];
        }
        int Nn;
        Nn = Integer.parseInt(N);
        if(Nn%calc == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }


    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String N = br.readLine();
        String[] array = N.split("");
        int calc = 0;
        int[] num = new int[array.length];
        for(int i = 0;i<array.length;i++){
            num[i] = Integer.parseInt(array[i]);
            calc += num[i];
        }
        int Nn;
        Nn = Integer.parseInt(N);
        if(Nn%calc == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }


    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String N = br.readLine(); N br.readLine() br.readLine br String[] array = N.split(""); array N.split("") N.split N "" int calc = 0; calc 0 int[] num = new int[array.length]; num new int[array.length] array.length array array.length for(int i = 0;i<array.length;i++){
            num[i] = Integer.parseInt(array[i]);
            calc += num[i];
        } int i = 0; int i = 0; i 0 i<array.length i array.length array array.length i++ i++ i {
            num[i] = Integer.parseInt(array[i]);
            calc += num[i];
        } {
            num[i] = Integer.parseInt(array[i]);
            calc += num[i];
        } num[i] = Integer.parseInt(array[i]) num[i] num i Integer.parseInt(array[i]) Integer.parseInt Integer array[i] array i calc += num[i] calc num[i] num i int Nn; Nn Nn = Integer.parseInt(N) Nn Integer.parseInt(N) Integer.parseInt Integer N if(Nn%calc == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        } Nn%calc == 0 Nn%calc Nn calc 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" String[] args args public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String N = br.readLine();
        String[] array = N.split("");
        int calc = 0;
        int[] num = new int[array.length];
        for(int i = 0;i<array.length;i++){
            num[i] = Integer.parseInt(array[i]);
            calc += num[i];
        }
        int Nn;
        Nn = Integer.parseInt(N);
        if(Nn%calc == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }


    }
} public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String N = br.readLine();
        String[] array = N.split("");
        int calc = 0;
        int[] num = new int[array.length];
        for(int i = 0;i<array.length;i++){
            num[i] = Integer.parseInt(array[i]);
            calc += num[i];
        }
        int Nn;
        Nn = Integer.parseInt(N);
        if(Nn%calc == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }


    }
} Main
import java.io.*;

public class Main {
    public static void main(String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String N = br.readLine();
        String[] array = N.split("");
        int calc = 0;
        int[] num = new int[array.length];
        for(int i = 0;i<array.length;i++){
            num[i] = Integer.parseInt(array[i]);
            calc += num[i];
        }
        int Nn;
        Nn = Integer.parseInt(N);
        if(Nn%calc == 0){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }


    }
}