import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int nSum = 0;
		for (int i = 1; i <= String.valueOf(n).length(); i++) {
			nSum += getDigit(n, i);
		}
		if (n % nSum == 0) {
			System.out.println("Yes");		
		} else {
			System.out.println("No");
		}
	}

	public static int getDigit(int n, int i) {
		int a = n / (int)Math.pow(10, i);
		a = a * (int)Math.pow(10, i);
		n = n - a;
		n = n / (int)Math.pow(10, i - 1);
		return n;
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int nSum = 0;
		for (int i = 1; i <= String.valueOf(n).length(); i++) {
			nSum += getDigit(n, i);
		}
		if (n % nSum == 0) {
			System.out.println("Yes");		
		} else {
			System.out.println("No");
		}
	}

	public static int getDigit(int n, int i) {
		int a = n / (int)Math.pow(10, i);
		a = a * (int)Math.pow(10, i);
		n = n - a;
		n = n / (int)Math.pow(10, i - 1);
		return n;
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int nSum = 0;
		for (int i = 1; i <= String.valueOf(n).length(); i++) {
			nSum += getDigit(n, i);
		}
		if (n % nSum == 0) {
			System.out.println("Yes");		
		} else {
			System.out.println("No");
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int nSum = 0;
		for (int i = 1; i <= String.valueOf(n).length(); i++) {
			nSum += getDigit(n, i);
		}
		if (n % nSum == 0) {
			System.out.println("Yes");		
		} else {
			System.out.println("No");
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int nSum = 0; nSum 0 for (int i = 1; i <= String.valueOf(n).length(); i++) {
			nSum += getDigit(n, i);
		} int i = 1; int i = 1; i 1 i <= String.valueOf(n).length() i String.valueOf(n).length() String.valueOf(n).length String.valueOf(n) String.valueOf String n i++ i++ i {
			nSum += getDigit(n, i);
		} {
			nSum += getDigit(n, i);
		} nSum += getDigit(n, i) nSum getDigit(n, i) getDigit n i if (n % nSum == 0) {
			System.out.println("Yes");		
		} else {
			System.out.println("No");
		} n % nSum == 0 n % nSum n nSum 0 {
			System.out.println("Yes");		
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public static int getDigit(int n, int i) {
		int a = n / (int)Math.pow(10, i);
		a = a * (int)Math.pow(10, i);
		n = n - a;
		n = n / (int)Math.pow(10, i - 1);
		return n;
	} getDigit {
		int a = n / (int)Math.pow(10, i);
		a = a * (int)Math.pow(10, i);
		n = n - a;
		n = n / (int)Math.pow(10, i - 1);
		return n;
	} int a = n / (int)Math.pow(10, i); a n / (int)Math.pow(10, i) n (int)Math.pow(10, i) Math.pow Math 10 i a = a * (int)Math.pow(10, i) a a * (int)Math.pow(10, i) a (int)Math.pow(10, i) Math.pow Math 10 i n = n - a n n - a n a n = n / (int)Math.pow(10, i - 1) n n / (int)Math.pow(10, i - 1) n (int)Math.pow(10, i - 1) Math.pow Math 10 i - 1 i 1 return n; n int n n int i i public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int nSum = 0;
		for (int i = 1; i <= String.valueOf(n).length(); i++) {
			nSum += getDigit(n, i);
		}
		if (n % nSum == 0) {
			System.out.println("Yes");		
		} else {
			System.out.println("No");
		}
	}

	public static int getDigit(int n, int i) {
		int a = n / (int)Math.pow(10, i);
		a = a * (int)Math.pow(10, i);
		n = n - a;
		n = n / (int)Math.pow(10, i - 1);
		return n;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int nSum = 0;
		for (int i = 1; i <= String.valueOf(n).length(); i++) {
			nSum += getDigit(n, i);
		}
		if (n % nSum == 0) {
			System.out.println("Yes");		
		} else {
			System.out.println("No");
		}
	}

	public static int getDigit(int n, int i) {
		int a = n / (int)Math.pow(10, i);
		a = a * (int)Math.pow(10, i);
		n = n - a;
		n = n / (int)Math.pow(10, i - 1);
		return n;
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int nSum = 0;
		for (int i = 1; i <= String.valueOf(n).length(); i++) {
			nSum += getDigit(n, i);
		}
		if (n % nSum == 0) {
			System.out.println("Yes");		
		} else {
			System.out.println("No");
		}
	}

	public static int getDigit(int n, int i) {
		int a = n / (int)Math.pow(10, i);
		a = a * (int)Math.pow(10, i);
		n = n - a;
		n = n / (int)Math.pow(10, i - 1);
		return n;
	}
}