

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		String strNum = String.valueOf(n);
		int sum = 0;
		for (int i = 0; i < strNum.length(); i++) {
			sum += Integer.parseInt(strNum.substring(i, i + 1));
		}
		
		if (n % sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		scanner.close();

	}

} 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();
		String strNum = String.valueOf(n);
		int sum = 0;
		for (int i = 0; i < strNum.length(); i++) {
			sum += Integer.parseInt(strNum.substring(i, i + 1));
		}
		
		if (n % sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		scanner.close();

	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		String strNum = String.valueOf(n);
		int sum = 0;
		for (int i = 0; i < strNum.length(); i++) {
			sum += Integer.parseInt(strNum.substring(i, i + 1));
		}
		
		if (n % sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		scanner.close();

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

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner String strNum = String.valueOf(n); strNum String.valueOf(n) String.valueOf String n int sum = 0; sum 0 for (int i = 0; i < strNum.length(); i++) {
			sum += Integer.parseInt(strNum.substring(i, i + 1));
		} int i = 0; int i = 0; i 0 i < strNum.length() i strNum.length() strNum.length strNum i++ i++ i {
			sum += Integer.parseInt(strNum.substring(i, i + 1));
		} {
			sum += Integer.parseInt(strNum.substring(i, i + 1));
		} sum += Integer.parseInt(strNum.substring(i, i + 1)) sum Integer.parseInt(strNum.substring(i, i + 1)) Integer.parseInt Integer strNum.substring(i, i + 1) strNum.substring strNum i i + 1 i 1 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" scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		String strNum = String.valueOf(n);
		int sum = 0;
		for (int i = 0; i < strNum.length(); i++) {
			sum += Integer.parseInt(strNum.substring(i, i + 1));
		}
		
		if (n % sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		scanner.close();

	}

} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		String strNum = String.valueOf(n);
		int sum = 0;
		for (int i = 0; i < strNum.length(); i++) {
			sum += Integer.parseInt(strNum.substring(i, i + 1));
		}
		
		if (n % sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		scanner.close();

	}

} Main


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		String strNum = String.valueOf(n);
		int sum = 0;
		for (int i = 0; i < strNum.length(); i++) {
			sum += Integer.parseInt(strNum.substring(i, i + 1));
		}
		
		if (n % sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		scanner.close();

	}

}
