import java.util.*;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		String str = String.valueOf(n);

		int total = 0;
		for (int i = 0; i < str.length(); i++) {
			total += Integer.valueOf(str.substring(i, i+1));
		}
		
		String ans = "No";
		if (0 == n%total) {
			ans = "Yes";
		}
		System.out.println(ans);

		sc.close();
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		String str = String.valueOf(n);

		int total = 0;
		for (int i = 0; i < str.length(); i++) {
			total += Integer.valueOf(str.substring(i, i+1));
		}
		
		String ans = "No";
		if (0 == n%total) {
			ans = "Yes";
		}
		System.out.println(ans);

		sc.close();
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		String str = String.valueOf(n);

		int total = 0;
		for (int i = 0; i < str.length(); i++) {
			total += Integer.valueOf(str.substring(i, i+1));
		}
		
		String ans = "No";
		if (0 == n%total) {
			ans = "Yes";
		}
		System.out.println(ans);

		sc.close();
	} main {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		String str = String.valueOf(n);

		int total = 0;
		for (int i = 0; i < str.length(); i++) {
			total += Integer.valueOf(str.substring(i, i+1));
		}
		
		String ans = "No";
		if (0 == n%total) {
			ans = "Yes";
		}
		System.out.println(ans);

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String str = String.valueOf(n); str String.valueOf(n) String.valueOf String n int total = 0; total 0 for (int i = 0; i < str.length(); i++) {
			total += Integer.valueOf(str.substring(i, i+1));
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			total += Integer.valueOf(str.substring(i, i+1));
		} {
			total += Integer.valueOf(str.substring(i, i+1));
		} total += Integer.valueOf(str.substring(i, i+1)) total Integer.valueOf(str.substring(i, i+1)) Integer.valueOf Integer str.substring(i, i+1) str.substring str i i+1 i 1 String ans = "No"; ans "No" if (0 == n%total) {
			ans = "Yes";
		} 0 == n%total 0 n%total n total {
			ans = "Yes";
		} ans = "Yes" ans "Yes" System.out.println(ans) System.out.println System.out System System.out ans 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 = sc.nextInt();
		String str = String.valueOf(n);

		int total = 0;
		for (int i = 0; i < str.length(); i++) {
			total += Integer.valueOf(str.substring(i, i+1));
		}
		
		String ans = "No";
		if (0 == n%total) {
			ans = "Yes";
		}
		System.out.println(ans);

		sc.close();
	}
} public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		String str = String.valueOf(n);

		int total = 0;
		for (int i = 0; i < str.length(); i++) {
			total += Integer.valueOf(str.substring(i, i+1));
		}
		
		String ans = "No";
		if (0 == n%total) {
			ans = "Yes";
		}
		System.out.println(ans);

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

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		String str = String.valueOf(n);

		int total = 0;
		for (int i = 0; i < str.length(); i++) {
			total += Integer.valueOf(str.substring(i, i+1));
		}
		
		String ans = "No";
		if (0 == n%total) {
			ans = "Yes";
		}
		System.out.println(ans);

		sc.close();
	}
}