import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int length = input.length();

		int total = 0;
		for (int i =  0; i<length; i++) {
			int k = Integer.parseInt(String.valueOf(input.charAt(i)));
			total = total + k;
		}
		String result = Integer.parseInt(input) % total == 0 ? "Yes" : "No";
		System.out.println(result);

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int length = input.length();

		int total = 0;
		for (int i =  0; i<length; i++) {
			int k = Integer.parseInt(String.valueOf(input.charAt(i)));
			total = total + k;
		}
		String result = Integer.parseInt(input) % total == 0 ? "Yes" : "No";
		System.out.println(result);

	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int length = input.length();

		int total = 0;
		for (int i =  0; i<length; i++) {
			int k = Integer.parseInt(String.valueOf(input.charAt(i)));
			total = total + k;
		}
		String result = Integer.parseInt(input) % total == 0 ? "Yes" : "No";
		System.out.println(result);

	} main {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int length = input.length();

		int total = 0;
		for (int i =  0; i<length; i++) {
			int k = Integer.parseInt(String.valueOf(input.charAt(i)));
			total = total + k;
		}
		String result = Integer.parseInt(input) % total == 0 ? "Yes" : "No";
		System.out.println(result);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.next(); input sc.next() sc.next sc int length = input.length(); length input.length() input.length input int total = 0; total 0 for (int i =  0; i<length; i++) {
			int k = Integer.parseInt(String.valueOf(input.charAt(i)));
			total = total + k;
		} int i =  0; int i =  0; i 0 i<length i length i++ i++ i {
			int k = Integer.parseInt(String.valueOf(input.charAt(i)));
			total = total + k;
		} {
			int k = Integer.parseInt(String.valueOf(input.charAt(i)));
			total = total + k;
		} int k = Integer.parseInt(String.valueOf(input.charAt(i))); k Integer.parseInt(String.valueOf(input.charAt(i))) Integer.parseInt Integer String.valueOf(input.charAt(i)) String.valueOf String input.charAt(i) input.charAt input i total = total + k total total + k total k String result = Integer.parseInt(input) % total == 0 ? "Yes" : "No"; result Integer.parseInt(input) % total == 0 ? "Yes" : "No" Integer.parseInt(input) % total == 0 Integer.parseInt(input) % total Integer.parseInt(input) Integer.parseInt Integer input total 0 "Yes" "No" System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int length = input.length();

		int total = 0;
		for (int i =  0; i<length; i++) {
			int k = Integer.parseInt(String.valueOf(input.charAt(i)));
			total = total + k;
		}
		String result = Integer.parseInt(input) % total == 0 ? "Yes" : "No";
		System.out.println(result);

	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int length = input.length();

		int total = 0;
		for (int i =  0; i<length; i++) {
			int k = Integer.parseInt(String.valueOf(input.charAt(i)));
			total = total + k;
		}
		String result = Integer.parseInt(input) % total == 0 ? "Yes" : "No";
		System.out.println(result);

	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		int length = input.length();

		int total = 0;
		for (int i =  0; i<length; i++) {
			int k = Integer.parseInt(String.valueOf(input.charAt(i)));
			total = total + k;
		}
		String result = Integer.parseInt(input) % total == 0 ? "Yes" : "No";
		System.out.println(result);

	}
}
