import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int num = 0;
		int tmp = N;
		while(N>=10) {
			num += N%10;
			N = N/10;
		}
		num += N;
		if(tmp%num==0) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
		in.close();
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int num = 0;
		int tmp = N;
		while(N>=10) {
			num += N%10;
			N = N/10;
		}
		num += N;
		if(tmp%num==0) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
		in.close();
		
	}
} Main public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int num = 0;
		int tmp = N;
		while(N>=10) {
			num += N%10;
			N = N/10;
		}
		num += N;
		if(tmp%num==0) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
		in.close();
		
	} main {
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int num = 0;
		int tmp = N;
		while(N>=10) {
			num += N%10;
			N = N/10;
		}
		num += N;
		if(tmp%num==0) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
		in.close();
		
	} Scanner in = new java.util.Scanner(System.in); in new java.util.Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int num = 0; num 0 int tmp = N; tmp N while(N>=10) {
			num += N%10;
			N = N/10;
		} N>=10 N 10 {
			num += N%10;
			N = N/10;
		} num += N%10 num N%10 N 10 N = N/10 N N/10 N 10 num += N num N if(tmp%num==0) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		} tmp%num==0 tmp%num tmp num 0 {
			System.out.print("Yes");
		} System.out.print("Yes") System.out.print System.out System System.out "Yes" {
			System.out.print("No");
		} System.out.print("No") System.out.print System.out System System.out "No" in.close() in.close in String[] args args public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int num = 0;
		int tmp = N;
		while(N>=10) {
			num += N%10;
			N = N/10;
		}
		num += N;
		if(tmp%num==0) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
		in.close();
		
	}
} public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int num = 0;
		int tmp = N;
		while(N>=10) {
			num += N%10;
			N = N/10;
		}
		num += N;
		if(tmp%num==0) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
		in.close();
		
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner in = new java.util.Scanner(System.in);
		int N = in.nextInt();
		int num = 0;
		int tmp = N;
		while(N>=10) {
			num += N%10;
			N = N/10;
		}
		num += N;
		if(tmp%num==0) {
			System.out.print("Yes");
		}else {
			System.out.print("No");
		}
		in.close();
		
	}
}