import java.util.*;
import static java.lang.Integer.*;
//import static java.lang.Long.*;
//import static java.lang.Math.*;
import static java.lang.System.*;
//import java.io.PrintWriter;

public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		String s = sc.next();
		sc.close();
		char[] ni = s.toCharArray();
		int n = parseInt(s);
		int sn = 0;
		for (i = 0; i < ni.length; i++) {
			sn += ni[i]-'0';
		}
		out.println(n%sn==0?"Yes":"No");
	}
} import java.util.*; util.* java import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.Integer.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		String s = sc.next();
		sc.close();
		char[] ni = s.toCharArray();
		int n = parseInt(s);
		int sn = 0;
		for (i = 0; i < ni.length; i++) {
			sn += ni[i]-'0';
		}
		out.println(n%sn==0?"Yes":"No");
	}
} Main public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		String s = sc.next();
		sc.close();
		char[] ni = s.toCharArray();
		int n = parseInt(s);
		int sn = 0;
		for (i = 0; i < ni.length; i++) {
			sn += ni[i]-'0';
		}
		out.println(n%sn==0?"Yes":"No");
	} main {
		int i,j;
		Scanner sc = new Scanner(in);
		String s = sc.next();
		sc.close();
		char[] ni = s.toCharArray();
		int n = parseInt(s);
		int sn = 0;
		for (i = 0; i < ni.length; i++) {
			sn += ni[i]-'0';
		}
		out.println(n%sn==0?"Yes":"No");
	} int i i j; j Scanner sc = new Scanner(in); sc new Scanner(in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc char[] ni = s.toCharArray(); ni s.toCharArray() s.toCharArray s int n = parseInt(s); n parseInt(s) parseInt s int sn = 0; sn 0 for (i = 0; i < ni.length; i++) {
			sn += ni[i]-'0';
		} i = 0; i = 0 i 0 i < ni.length i ni.length ni ni.length i++ i++ i {
			sn += ni[i]-'0';
		} {
			sn += ni[i]-'0';
		} sn += ni[i]-'0' sn ni[i]-'0' ni[i] ni i '0' out.println(n%sn==0?"Yes":"No") out.println out n%sn==0?"Yes":"No" n%sn==0 n%sn n sn 0 "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		String s = sc.next();
		sc.close();
		char[] ni = s.toCharArray();
		int n = parseInt(s);
		int sn = 0;
		for (i = 0; i < ni.length; i++) {
			sn += ni[i]-'0';
		}
		out.println(n%sn==0?"Yes":"No");
	}
} public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		String s = sc.next();
		sc.close();
		char[] ni = s.toCharArray();
		int n = parseInt(s);
		int sn = 0;
		for (i = 0; i < ni.length; i++) {
			sn += ni[i]-'0';
		}
		out.println(n%sn==0?"Yes":"No");
	}
} Main
import java.util.*;
import static java.lang.Integer.*;
//import static java.lang.Long.*;
//import static java.lang.Math.*;
import static java.lang.System.*;
//import java.io.PrintWriter;

public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		String s = sc.next();
		sc.close();
		char[] ni = s.toCharArray();
		int n = parseInt(s);
		int sn = 0;
		for (i = 0; i < ni.length; i++) {
			sn += ni[i]-'0';
		}
		out.println(n%sn==0?"Yes":"No");
	}
}
