import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.close();
		String s = String.valueOf(N);

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			String ss = s.substring(i, i+1);
			int a = Integer.parseInt(ss);
			sum += a;
		}

		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 sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.close();
		String s = String.valueOf(N);

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			String ss = s.substring(i, i+1);
			int a = Integer.parseInt(ss);
			sum += a;
		}

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

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			String ss = s.substring(i, i+1);
			int a = Integer.parseInt(ss);
			sum += a;
		}

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

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			String ss = s.substring(i, i+1);
			int a = Integer.parseInt(ss);
			sum += a;
		}

		if (N % sum == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc sc.close() sc.close sc String s = String.valueOf(N); s String.valueOf(N) String.valueOf String N int sum = 0; sum 0 for (int i = 0; i < s.length(); i++) {
			String ss = s.substring(i, i+1);
			int a = Integer.parseInt(ss);
			sum += a;
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			String ss = s.substring(i, i+1);
			int a = Integer.parseInt(ss);
			sum += a;
		} {
			String ss = s.substring(i, i+1);
			int a = Integer.parseInt(ss);
			sum += a;
		} String ss = s.substring(i, i+1); ss s.substring(i, i+1) s.substring s i i+1 i 1 int a = Integer.parseInt(ss); a Integer.parseInt(ss) Integer.parseInt Integer ss sum += a sum a 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 sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.close();
		String s = String.valueOf(N);

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			String ss = s.substring(i, i+1);
			int a = Integer.parseInt(ss);
			sum += a;
		}

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

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			String ss = s.substring(i, i+1);
			int a = Integer.parseInt(ss);
			sum += a;
		}

		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 sc = new Scanner(System.in);
		int N = sc.nextInt();
		sc.close();
		String s = String.valueOf(N);

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			String ss = s.substring(i, i+1);
			int a = Integer.parseInt(ss);
			sum += a;
		}

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