import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int sum = 0;

		//数値を文字列に変換
		String str = String.valueOf(N);

		for (int i = 0; i < str.length(); i++) {
			String sub = str.substring(i,i+1);
			int x = Integer.parseInt(sub);

			sum = sum + x;
		}

		if (N%sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int sum = 0;

		//数値を文字列に変換
		String str = String.valueOf(N);

		for (int i = 0; i < str.length(); i++) {
			String sub = str.substring(i,i+1);
			int x = Integer.parseInt(sub);

			sum = sum + x;
		}

		if (N%sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int sum = 0;

		//数値を文字列に変換
		String str = String.valueOf(N);

		for (int i = 0; i < str.length(); i++) {
			String sub = str.substring(i,i+1);
			int x = Integer.parseInt(sub);

			sum = sum + x;
		}

		if (N%sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int sum = 0;

		//数値を文字列に変換
		String str = String.valueOf(N);

		for (int i = 0; i < str.length(); i++) {
			String sub = str.substring(i,i+1);
			int x = Integer.parseInt(sub);

			sum = sum + x;
		}

		if (N%sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int sum = 0; sum 0 String str = String.valueOf(N); str String.valueOf(N) String.valueOf String N for (int i = 0; i < str.length(); i++) {
			String sub = str.substring(i,i+1);
			int x = Integer.parseInt(sub);

			sum = sum + x;
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			String sub = str.substring(i,i+1);
			int x = Integer.parseInt(sub);

			sum = sum + x;
		} {
			String sub = str.substring(i,i+1);
			int x = Integer.parseInt(sub);

			sum = sum + x;
		} String sub = str.substring(i,i+1); sub str.substring(i,i+1) str.substring str i i+1 i 1 int x = Integer.parseInt(sub); x Integer.parseInt(sub) Integer.parseInt Integer sub sum = sum + x sum sum + x sum x if (N%sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} N%sum == 0 N%sum N sum 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 public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int sum = 0;

		//数値を文字列に変換
		String str = String.valueOf(N);

		for (int i = 0; i < str.length(); i++) {
			String sub = str.substring(i,i+1);
			int x = Integer.parseInt(sub);

			sum = sum + x;
		}

		if (N%sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int sum = 0;

		//数値を文字列に変換
		String str = String.valueOf(N);

		for (int i = 0; i < str.length(); i++) {
			String sub = str.substring(i,i+1);
			int x = Integer.parseInt(sub);

			sum = sum + x;
		}

		if (N%sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int sum = 0;

		//数値を文字列に変換
		String str = String.valueOf(N);

		for (int i = 0; i < str.length(); i++) {
			String sub = str.substring(i,i+1);
			int x = Integer.parseInt(sub);

			sum = sum + x;
		}

		if (N%sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}