import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		long num = Long.parseLong(s);
		int sum = 0;
		for (char c : s.toCharArray()) {
			sum  += c - '0';
		}
		System.out.println(num % sum == 0 ? "Yes" : "No");
	}
}