import java.util.Scanner;

public class Main {

	/** 10 */
	private static final int TEN = 10;

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			System.out.println((0 == n % s(n)) ? "Yes" : "No");
		}
	}

	/**
	 * 整数nに対して、nを十進法で表したときの各桁の和
	 * 
	 * @param n 整数n
	 * @return nを十進法で表したときの各桁の和
	 */
	private static int s(int n) {
		int answer = 0;
		while (n > 0) {
			answer += n % TEN;
			n /= TEN;
		}
		return answer;
	}
} import java.util.Scanner; Scanner java.util public class Main {

	/** 10 */
	private static final int TEN = 10;

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			System.out.println((0 == n % s(n)) ? "Yes" : "No");
		}
	}

	/**
	 * 整数nに対して、nを十進法で表したときの各桁の和
	 * 
	 * @param n 整数n
	 * @return nを十進法で表したときの各桁の和
	 */
	private static int s(int n) {
		int answer = 0;
		while (n > 0) {
			answer += n % TEN;
			n /= TEN;
		}
		return answer;
	}
} Main /** 10 */
	private static final int TEN = 10; TEN 10 public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			System.out.println((0 == n % s(n)) ? "Yes" : "No");
		}
	} main {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			System.out.println((0 == n % s(n)) ? "Yes" : "No");
		}
	} try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			System.out.println((0 == n % s(n)) ? "Yes" : "No");
		} {
			int n = scanner.nextInt();
			System.out.println((0 == n % s(n)) ? "Yes" : "No");
		} Scanner scanner = new Scanner(System.in) Scanner scanner = new Scanner(System.in) new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner System.out.println((0 == n % s(n)) ? "Yes" : "No") System.out.println System.out System System.out (0 == n % s(n)) ? "Yes" : "No" (0 == n % s(n)) 0 n % s(n) n s(n) s n "Yes" "No" String[] args args /**
	 * 整数nに対して、nを十進法で表したときの各桁の和
	 * 
	 * @param n 整数n
	 * @return nを十進法で表したときの各桁の和
	 */
	private static int s(int n) {
		int answer = 0;
		while (n > 0) {
			answer += n % TEN;
			n /= TEN;
		}
		return answer;
	} s {
		int answer = 0;
		while (n > 0) {
			answer += n % TEN;
			n /= TEN;
		}
		return answer;
	} int answer = 0; answer 0 while (n > 0) {
			answer += n % TEN;
			n /= TEN;
		} n > 0 n 0 {
			answer += n % TEN;
			n /= TEN;
		} answer += n % TEN answer n % TEN n TEN n /= TEN n TEN return answer; answer int n n public class Main {

	/** 10 */
	private static final int TEN = 10;

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			System.out.println((0 == n % s(n)) ? "Yes" : "No");
		}
	}

	/**
	 * 整数nに対して、nを十進法で表したときの各桁の和
	 * 
	 * @param n 整数n
	 * @return nを十進法で表したときの各桁の和
	 */
	private static int s(int n) {
		int answer = 0;
		while (n > 0) {
			answer += n % TEN;
			n /= TEN;
		}
		return answer;
	}
} public class Main {

	/** 10 */
	private static final int TEN = 10;

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			System.out.println((0 == n % s(n)) ? "Yes" : "No");
		}
	}

	/**
	 * 整数nに対して、nを十進法で表したときの各桁の和
	 * 
	 * @param n 整数n
	 * @return nを十進法で表したときの各桁の和
	 */
	private static int s(int n) {
		int answer = 0;
		while (n > 0) {
			answer += n % TEN;
			n /= TEN;
		}
		return answer;
	}
} Main
import java.util.Scanner;

public class Main {

	/** 10 */
	private static final int TEN = 10;

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			System.out.println((0 == n % s(n)) ? "Yes" : "No");
		}
	}

	/**
	 * 整数nに対して、nを十進法で表したときの各桁の和
	 * 
	 * @param n 整数n
	 * @return nを十進法で表したときの各桁の和
	 */
	private static int s(int n) {
		int answer = 0;
		while (n > 0) {
			answer += n % TEN;
			n /= TEN;
		}
		return answer;
	}
}
