import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		char[] ary = String.valueOf(n).toCharArray();
		int s = 0;
		for (char c : ary) {
			s += Character.getNumericValue(c);
		}
		System.out.println(n%s==0? "Yes":"No");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		char[] ary = String.valueOf(n).toCharArray();
		int s = 0;
		for (char c : ary) {
			s += Character.getNumericValue(c);
		}
		System.out.println(n%s==0? "Yes":"No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		char[] ary = String.valueOf(n).toCharArray();
		int s = 0;
		for (char c : ary) {
			s += Character.getNumericValue(c);
		}
		System.out.println(n%s==0? "Yes":"No");
	} main {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		char[] ary = String.valueOf(n).toCharArray();
		int s = 0;
		for (char c : ary) {
			s += Character.getNumericValue(c);
		}
		System.out.println(n%s==0? "Yes":"No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc char[] ary = String.valueOf(n).toCharArray(); ary String.valueOf(n).toCharArray() String.valueOf(n).toCharArray String.valueOf(n) String.valueOf String n int s = 0; s 0 for (char c : ary) {
			s += Character.getNumericValue(c);
		} char c ary {
			s += Character.getNumericValue(c);
		} {
			s += Character.getNumericValue(c);
		} s += Character.getNumericValue(c) s Character.getNumericValue(c) Character.getNumericValue Character c System.out.println(n%s==0? "Yes":"No") System.out.println System.out System System.out n%s==0? "Yes":"No" n%s==0 n%s n s 0 "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		char[] ary = String.valueOf(n).toCharArray();
		int s = 0;
		for (char c : ary) {
			s += Character.getNumericValue(c);
		}
		System.out.println(n%s==0? "Yes":"No");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		char[] ary = String.valueOf(n).toCharArray();
		int s = 0;
		for (char c : ary) {
			s += Character.getNumericValue(c);
		}
		System.out.println(n%s==0? "Yes":"No");
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		char[] ary = String.valueOf(n).toCharArray();
		int s = 0;
		for (char c : ary) {
			s += Character.getNumericValue(c);
		}
		System.out.println(n%s==0? "Yes":"No");
	}
}
