import java.util.*;
public class Main {

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

	}

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

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

	}

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

	} main {
		solve();

	} solve() solve String[] args args public class Main {

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

	}

} public class Main {

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

	}

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

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

	}

}
