import java.util.Scanner;

class Main{

	static char[][] map;
	static int H;
	static int W;

	public static void main(String[] args) {



		Scanner sc = new Scanner(System.in);			//文字の入力
		String a =sc.next(); 
		int N = Integer.parseInt(a);
		int keta = String.valueOf(N).length();
		int S  = 0;
		for(int i =0;i < a.length();i++){
			S += Character.getNumericValue(a.charAt(i)); 
		}
		if(N%S==0){
			System.out.println("Yes");
		}else{
			System.out.println("No");

		}
			
			
			
			
	}
}




class Pair implements Comparable{
	String from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	}
}


 import java.util.Scanner; Scanner java.util class Main{

	static char[][] map;
	static int H;
	static int W;

	public static void main(String[] args) {



		Scanner sc = new Scanner(System.in);			//文字の入力
		String a =sc.next(); 
		int N = Integer.parseInt(a);
		int keta = String.valueOf(N).length();
		int S  = 0;
		for(int i =0;i < a.length();i++){
			S += Character.getNumericValue(a.charAt(i)); 
		}
		if(N%S==0){
			System.out.println("Yes");
		}else{
			System.out.println("No");

		}
			
			
			
			
	}
} Main static char[][] map; map static int H; H static int W; W public static void main(String[] args) {



		Scanner sc = new Scanner(System.in);			//文字の入力
		String a =sc.next(); 
		int N = Integer.parseInt(a);
		int keta = String.valueOf(N).length();
		int S  = 0;
		for(int i =0;i < a.length();i++){
			S += Character.getNumericValue(a.charAt(i)); 
		}
		if(N%S==0){
			System.out.println("Yes");
		}else{
			System.out.println("No");

		}
			
			
			
			
	} main {



		Scanner sc = new Scanner(System.in);			//文字の入力
		String a =sc.next(); 
		int N = Integer.parseInt(a);
		int keta = String.valueOf(N).length();
		int S  = 0;
		for(int i =0;i < a.length();i++){
			S += Character.getNumericValue(a.charAt(i)); 
		}
		if(N%S==0){
			System.out.println("Yes");
		}else{
			System.out.println("No");

		}
			
			
			
			
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a =sc.next(); a sc.next() sc.next sc int N = Integer.parseInt(a); N Integer.parseInt(a) Integer.parseInt Integer a int keta = String.valueOf(N).length(); keta String.valueOf(N).length() String.valueOf(N).length String.valueOf(N) String.valueOf String N int S  = 0; S 0 for(int i =0;i < a.length();i++){
			S += Character.getNumericValue(a.charAt(i)); 
		} int i =0; int i =0; i 0 i < a.length() i a.length() a.length a i++ i++ i {
			S += Character.getNumericValue(a.charAt(i)); 
		} {
			S += Character.getNumericValue(a.charAt(i)); 
		} S += Character.getNumericValue(a.charAt(i)) S Character.getNumericValue(a.charAt(i)) Character.getNumericValue Character a.charAt(i) a.charAt a i if(N%S==0){
			System.out.println("Yes");
		}else{
			System.out.println("No");

		} N%S==0 N%S N S 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 class Pair implements Comparable{
	String from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	}
} Pair String from; from int end; end @Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	} compareTo {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	} Pair otherpair = (Pair)other; otherpair (Pair)other return end - otherpair.end; end - otherpair.end end otherpair.end otherpair otherpair.end Object other other Comparable
import java.util.Scanner;

class Main{

	static char[][] map;
	static int H;
	static int W;

	public static void main(String[] args) {



		Scanner sc = new Scanner(System.in);			//文字の入力
		String a =sc.next(); 
		int N = Integer.parseInt(a);
		int keta = String.valueOf(N).length();
		int S  = 0;
		for(int i =0;i < a.length();i++){
			S += Character.getNumericValue(a.charAt(i)); 
		}
		if(N%S==0){
			System.out.println("Yes");
		}else{
			System.out.println("No");

		}
			
			
			
			
	}
}




class Pair implements Comparable{
	String from;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	}
}



