import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int aux = n; int sum = 0;
		while(aux > 0){
			sum += aux%10;
			aux/=10;
		}
		if(n % sum == 0) System.out.println("Yes");
		else System.out.println("No");
	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int aux = n; int sum = 0;
		while(aux > 0){
			sum += aux%10;
			aux/=10;
		}
		if(n % sum == 0) System.out.println("Yes");
		else System.out.println("No");
	}

} Main public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int aux = n; int sum = 0;
		while(aux > 0){
			sum += aux%10;
			aux/=10;
		}
		if(n % sum == 0) System.out.println("Yes");
		else System.out.println("No");
	} main {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int aux = n; int sum = 0;
		while(aux > 0){
			sum += aux%10;
			aux/=10;
		}
		if(n % sum == 0) System.out.println("Yes");
		else System.out.println("No");
	} Scanner seer = new Scanner(System.in); seer new Scanner(System.in) int n = seer.nextInt(); n seer.nextInt() seer.nextInt seer int aux = n; aux n int sum = 0; sum 0 while(aux > 0){
			sum += aux%10;
			aux/=10;
		} aux > 0 aux 0 {
			sum += aux%10;
			aux/=10;
		} sum += aux%10 sum aux%10 aux 10 aux/=10 aux 10 if(n % sum == 0) System.out.println("Yes");
		else System.out.println("No"); n % sum == 0 n % sum n sum 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 seer = new Scanner(System.in);
		int n = seer.nextInt();
		int aux = n; int sum = 0;
		while(aux > 0){
			sum += aux%10;
			aux/=10;
		}
		if(n % sum == 0) System.out.println("Yes");
		else System.out.println("No");
	}

} public class Main {

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int aux = n; int sum = 0;
		while(aux > 0){
			sum += aux%10;
			aux/=10;
		}
		if(n % sum == 0) System.out.println("Yes");
		else System.out.println("No");
	}

} Main
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int aux = n; int sum = 0;
		while(aux > 0){
			sum += aux%10;
			aux/=10;
		}
		if(n % sum == 0) System.out.println("Yes");
		else System.out.println("No");
	}

}
