import java.util.*;
import java.io.*;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long line = in.nextInt();//文字列の入力受付
        String s = String.valueOf(line);
        int p = 0;
        String sl[]= s.split("");
        for (int i = 0;i < sl.length ;i++ ){
            p = p + Integer.parseInt(sl[i]);
        }
        if (line % p == 0){
            System.out.println("Yes");
        } else{
            System.out.println("No");
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long line = in.nextInt();//文字列の入力受付
        String s = String.valueOf(line);
        int p = 0;
        String sl[]= s.split("");
        for (int i = 0;i < sl.length ;i++ ){
            p = p + Integer.parseInt(sl[i]);
        }
        if (line % p == 0){
            System.out.println("Yes");
        } else{
            System.out.println("No");
        }
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long line = in.nextInt();//文字列の入力受付
        String s = String.valueOf(line);
        int p = 0;
        String sl[]= s.split("");
        for (int i = 0;i < sl.length ;i++ ){
            p = p + Integer.parseInt(sl[i]);
        }
        if (line % p == 0){
            System.out.println("Yes");
        } else{
            System.out.println("No");
        }
    } main {
        Scanner in = new Scanner(System.in);
        long line = in.nextInt();//文字列の入力受付
        String s = String.valueOf(line);
        int p = 0;
        String sl[]= s.split("");
        for (int i = 0;i < sl.length ;i++ ){
            p = p + Integer.parseInt(sl[i]);
        }
        if (line % p == 0){
            System.out.println("Yes");
        } else{
            System.out.println("No");
        }
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) long line = in.nextInt(); line in.nextInt() in.nextInt in String s = String.valueOf(line); s String.valueOf(line) String.valueOf String line int p = 0; p 0 String sl[]= s.split(""); sl s.split("") s.split s "" for (int i = 0;i < sl.length ;i++ ){
            p = p + Integer.parseInt(sl[i]);
        } int i = 0; int i = 0; i 0 i < sl.length i sl.length sl sl.length i++ i++ i {
            p = p + Integer.parseInt(sl[i]);
        } {
            p = p + Integer.parseInt(sl[i]);
        } p = p + Integer.parseInt(sl[i]) p p + Integer.parseInt(sl[i]) p Integer.parseInt(sl[i]) Integer.parseInt Integer sl[i] sl i if (line % p == 0){
            System.out.println("Yes");
        } else{
            System.out.println("No");
        } line % p == 0 line % p line p 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) {
        Scanner in = new Scanner(System.in);
        long line = in.nextInt();//文字列の入力受付
        String s = String.valueOf(line);
        int p = 0;
        String sl[]= s.split("");
        for (int i = 0;i < sl.length ;i++ ){
            p = p + Integer.parseInt(sl[i]);
        }
        if (line % p == 0){
            System.out.println("Yes");
        } else{
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long line = in.nextInt();//文字列の入力受付
        String s = String.valueOf(line);
        int p = 0;
        String sl[]= s.split("");
        for (int i = 0;i < sl.length ;i++ ){
            p = p + Integer.parseInt(sl[i]);
        }
        if (line % p == 0){
            System.out.println("Yes");
        } else{
            System.out.println("No");
        }
    }
} Main
import java.util.*;
import java.io.*;
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long line = in.nextInt();//文字列の入力受付
        String s = String.valueOf(line);
        int p = 0;
        String sl[]= s.split("");
        for (int i = 0;i < sl.length ;i++ ){
            p = p + Integer.parseInt(sl[i]);
        }
        if (line % p == 0){
            System.out.println("Yes");
        } else{
            System.out.println("No");
        }
    }
}