import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		System.out.println(Solution(N));
	}
	static String Solution(int N) {
		int number = 0;
		String s = N+"";
		for(int i=0; i<s.length(); i++) {
			number = number + Integer.parseInt(s.charAt(i)+"");
		}
		if(N%number==0) {
			return "Yes";
		}
		return "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();
		System.out.println(Solution(N));
	}
	static String Solution(int N) {
		int number = 0;
		String s = N+"";
		for(int i=0; i<s.length(); i++) {
			number = number + Integer.parseInt(s.charAt(i)+"");
		}
		if(N%number==0) {
			return "Yes";
		}
		return "No";
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		System.out.println(Solution(N));
	} main {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		System.out.println(Solution(N));
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner System.out.println(Solution(N)) System.out.println System.out System System.out Solution(N) Solution N String[] args args static String Solution(int N) {
		int number = 0;
		String s = N+"";
		for(int i=0; i<s.length(); i++) {
			number = number + Integer.parseInt(s.charAt(i)+"");
		}
		if(N%number==0) {
			return "Yes";
		}
		return "No";
	} Solution {
		int number = 0;
		String s = N+"";
		for(int i=0; i<s.length(); i++) {
			number = number + Integer.parseInt(s.charAt(i)+"");
		}
		if(N%number==0) {
			return "Yes";
		}
		return "No";
	} int number = 0; number 0 String s = N+""; s N+"" N "" for(int i=0; i<s.length(); i++) {
			number = number + Integer.parseInt(s.charAt(i)+"");
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			number = number + Integer.parseInt(s.charAt(i)+"");
		} {
			number = number + Integer.parseInt(s.charAt(i)+"");
		} number = number + Integer.parseInt(s.charAt(i)+"") number number + Integer.parseInt(s.charAt(i)+"") number Integer.parseInt(s.charAt(i)+"") Integer.parseInt Integer s.charAt(i)+"" s.charAt(i) s.charAt s i "" if(N%number==0) {
			return "Yes";
		} N%number==0 N%number N number 0 {
			return "Yes";
		} return "Yes"; "Yes" return "No"; "No" int N N public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		System.out.println(Solution(N));
	}
	static String Solution(int N) {
		int number = 0;
		String s = N+"";
		for(int i=0; i<s.length(); i++) {
			number = number + Integer.parseInt(s.charAt(i)+"");
		}
		if(N%number==0) {
			return "Yes";
		}
		return "No";
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		System.out.println(Solution(N));
	}
	static String Solution(int N) {
		int number = 0;
		String s = N+"";
		for(int i=0; i<s.length(); i++) {
			number = number + Integer.parseInt(s.charAt(i)+"");
		}
		if(N%number==0) {
			return "Yes";
		}
		return "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();
		System.out.println(Solution(N));
	}
	static String Solution(int N) {
		int number = 0;
		String s = N+"";
		for(int i=0; i<s.length(); i++) {
			number = number + Integer.parseInt(s.charAt(i)+"");
		}
		if(N%number==0) {
			return "Yes";
		}
		return "No";
	}
}
