import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int s=calcDigitSum(n);
		
		String ans=(n%s==0)?"Yes":"No";
		System.out.println(ans);
	}
	
	private static int calcDigitSum(int n) {
		int digitSum = 0;
		for (int i = n; i > 0; i /= 10) {
			digitSum += i % 10;
		}
		return digitSum;
	}
} import java.util.Scanner; Scanner java.util public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int s=calcDigitSum(n);
		
		String ans=(n%s==0)?"Yes":"No";
		System.out.println(ans);
	}
	
	private static int calcDigitSum(int n) {
		int digitSum = 0;
		for (int i = n; i > 0; i /= 10) {
			digitSum += i % 10;
		}
		return digitSum;
	}
} Main @SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int s=calcDigitSum(n);
		
		String ans=(n%s==0)?"Yes":"No";
		System.out.println(ans);
	} main {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int s=calcDigitSum(n);
		
		String ans=(n%s==0)?"Yes":"No";
		System.out.println(ans);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int s=calcDigitSum(n); s calcDigitSum(n) calcDigitSum n String ans=(n%s==0)?"Yes":"No"; ans (n%s==0)?"Yes":"No" (n%s==0) n%s n s 0 "Yes" "No" System.out.println(ans) System.out.println System.out System System.out ans String args[] args private static int calcDigitSum(int n) {
		int digitSum = 0;
		for (int i = n; i > 0; i /= 10) {
			digitSum += i % 10;
		}
		return digitSum;
	} calcDigitSum {
		int digitSum = 0;
		for (int i = n; i > 0; i /= 10) {
			digitSum += i % 10;
		}
		return digitSum;
	} int digitSum = 0; digitSum 0 for (int i = n; i > 0; i /= 10) {
			digitSum += i % 10;
		} int i = n; int i = n; i n i > 0 i 0 i /= 10 i /= 10 i 10 {
			digitSum += i % 10;
		} {
			digitSum += i % 10;
		} digitSum += i % 10 digitSum i % 10 i 10 return digitSum; digitSum int n n public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int s=calcDigitSum(n);
		
		String ans=(n%s==0)?"Yes":"No";
		System.out.println(ans);
	}
	
	private static int calcDigitSum(int n) {
		int digitSum = 0;
		for (int i = n; i > 0; i /= 10) {
			digitSum += i % 10;
		}
		return digitSum;
	}
} public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int s=calcDigitSum(n);
		
		String ans=(n%s==0)?"Yes":"No";
		System.out.println(ans);
	}
	
	private static int calcDigitSum(int n) {
		int digitSum = 0;
		for (int i = n; i > 0; i /= 10) {
			digitSum += i % 10;
		}
		return digitSum;
	}
} Main
import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n = scanner.nextInt();
		int s=calcDigitSum(n);
		
		String ans=(n%s==0)?"Yes":"No";
		System.out.println(ans);
	}
	
	private static int calcDigitSum(int n) {
		int digitSum = 0;
		for (int i = n; i > 0; i /= 10) {
			digitSum += i % 10;
		}
		return digitSum;
	}
}
