import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String inputLine = sc.nextLine();
		long input = Long.parseLong(inputLine);
		long inputCopy = input;
		int div = 0;
		int digits = (int)Math.log(input);
		
		for(;digits >= 0;--digits) {
			div += inputCopy / Math.pow(10, digits);
			inputCopy = inputCopy % (long)Math.pow(10, digits);
		}
		
		sc.close();
		if(input % div == 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);
		String inputLine = sc.nextLine();
		long input = Long.parseLong(inputLine);
		long inputCopy = input;
		int div = 0;
		int digits = (int)Math.log(input);
		
		for(;digits >= 0;--digits) {
			div += inputCopy / Math.pow(10, digits);
			inputCopy = inputCopy % (long)Math.pow(10, digits);
		}
		
		sc.close();
		if(input % div == 0)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String inputLine = sc.nextLine();
		long input = Long.parseLong(inputLine);
		long inputCopy = input;
		int div = 0;
		int digits = (int)Math.log(input);
		
		for(;digits >= 0;--digits) {
			div += inputCopy / Math.pow(10, digits);
			inputCopy = inputCopy % (long)Math.pow(10, digits);
		}
		
		sc.close();
		if(input % div == 0)
			System.out.println("Yes");
		else
			System.out.println("No");
	} main {
		Scanner sc = new Scanner(System.in);
		String inputLine = sc.nextLine();
		long input = Long.parseLong(inputLine);
		long inputCopy = input;
		int div = 0;
		int digits = (int)Math.log(input);
		
		for(;digits >= 0;--digits) {
			div += inputCopy / Math.pow(10, digits);
			inputCopy = inputCopy % (long)Math.pow(10, digits);
		}
		
		sc.close();
		if(input % div == 0)
			System.out.println("Yes");
		else
			System.out.println("No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String inputLine = sc.nextLine(); inputLine sc.nextLine() sc.nextLine sc long input = Long.parseLong(inputLine); input Long.parseLong(inputLine) Long.parseLong Long inputLine long inputCopy = input; inputCopy input int div = 0; div 0 int digits = (int)Math.log(input); digits (int)Math.log(input) Math.log Math input for(;digits >= 0;--digits) {
			div += inputCopy / Math.pow(10, digits);
			inputCopy = inputCopy % (long)Math.pow(10, digits);
		} ; digits >= 0 digits 0 --digits --digits digits {
			div += inputCopy / Math.pow(10, digits);
			inputCopy = inputCopy % (long)Math.pow(10, digits);
		} {
			div += inputCopy / Math.pow(10, digits);
			inputCopy = inputCopy % (long)Math.pow(10, digits);
		} div += inputCopy / Math.pow(10, digits) div inputCopy / Math.pow(10, digits) inputCopy Math.pow(10, digits) Math.pow Math 10 digits inputCopy = inputCopy % (long)Math.pow(10, digits) inputCopy inputCopy % (long)Math.pow(10, digits) inputCopy (long)Math.pow(10, digits) Math.pow Math 10 digits sc.close() sc.close sc if(input % div == 0)
			System.out.println("Yes");
		else
			System.out.println("No"); input % div == 0 input % div input div 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" 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);
		String inputLine = sc.nextLine();
		long input = Long.parseLong(inputLine);
		long inputCopy = input;
		int div = 0;
		int digits = (int)Math.log(input);
		
		for(;digits >= 0;--digits) {
			div += inputCopy / Math.pow(10, digits);
			inputCopy = inputCopy % (long)Math.pow(10, digits);
		}
		
		sc.close();
		if(input % div == 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);
		String inputLine = sc.nextLine();
		long input = Long.parseLong(inputLine);
		long inputCopy = input;
		int div = 0;
		int digits = (int)Math.log(input);
		
		for(;digits >= 0;--digits) {
			div += inputCopy / Math.pow(10, digits);
			inputCopy = inputCopy % (long)Math.pow(10, digits);
		}
		
		sc.close();
		if(input % div == 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);
		String inputLine = sc.nextLine();
		long input = Long.parseLong(inputLine);
		long inputCopy = input;
		int div = 0;
		int digits = (int)Math.log(input);
		
		for(;digits >= 0;--digits) {
			div += inputCopy / Math.pow(10, digits);
			inputCopy = inputCopy % (long)Math.pow(10, digits);
		}
		
		sc.close();
		if(input % div == 0)
			System.out.println("Yes");
		else
			System.out.println("No");
	}
}