import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		String s[]=String.valueOf(n).split("");
		int total=0;
		for(int i=0;i<s.length;i++){
			total+=Integer.parseInt(s[i]);
		}
		if(n%total==0){
			put("Yes");
		}else{
			put("No");
		}

}
	public static void put(String n){
		System.out.println(n);
	}

} 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 s[]=String.valueOf(n).split("");
		int total=0;
		for(int i=0;i<s.length;i++){
			total+=Integer.parseInt(s[i]);
		}
		if(n%total==0){
			put("Yes");
		}else{
			put("No");
		}

}
	public static void put(String n){
		System.out.println(n);
	}

} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		String s[]=String.valueOf(n).split("");
		int total=0;
		for(int i=0;i<s.length;i++){
			total+=Integer.parseInt(s[i]);
		}
		if(n%total==0){
			put("Yes");
		}else{
			put("No");
		}

} main {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		String s[]=String.valueOf(n).split("");
		int total=0;
		for(int i=0;i<s.length;i++){
			total+=Integer.parseInt(s[i]);
		}
		if(n%total==0){
			put("Yes");
		}else{
			put("No");
		}

} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc String s[]=String.valueOf(n).split(""); s String.valueOf(n).split("") String.valueOf(n).split String.valueOf(n) String.valueOf String n "" int total=0; total 0 for(int i=0;i<s.length;i++){
			total+=Integer.parseInt(s[i]);
		} int i=0; int i=0; i 0 i<s.length i s.length s s.length i++ i++ i {
			total+=Integer.parseInt(s[i]);
		} {
			total+=Integer.parseInt(s[i]);
		} total+=Integer.parseInt(s[i]) total Integer.parseInt(s[i]) Integer.parseInt Integer s[i] s i if(n%total==0){
			put("Yes");
		}else{
			put("No");
		} n%total==0 n%total n total 0 {
			put("Yes");
		} put("Yes") put "Yes" {
			put("No");
		} put("No") put "No" String[] args args public static void put(String n){
		System.out.println(n);
	} put {
		System.out.println(n);
	} System.out.println(n) System.out.println System.out System System.out n String n n public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		String s[]=String.valueOf(n).split("");
		int total=0;
		for(int i=0;i<s.length;i++){
			total+=Integer.parseInt(s[i]);
		}
		if(n%total==0){
			put("Yes");
		}else{
			put("No");
		}

}
	public static void put(String n){
		System.out.println(n);
	}

} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		String s[]=String.valueOf(n).split("");
		int total=0;
		for(int i=0;i<s.length;i++){
			total+=Integer.parseInt(s[i]);
		}
		if(n%total==0){
			put("Yes");
		}else{
			put("No");
		}

}
	public static void put(String n){
		System.out.println(n);
	}

} Main
import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		String s[]=String.valueOf(n).split("");
		int total=0;
		for(int i=0;i<s.length;i++){
			total+=Integer.parseInt(s[i]);
		}
		if(n%total==0){
			put("Yes");
		}else{
			put("No");
		}

}
	public static void put(String n){
		System.out.println(n);
	}

}
