import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	int M = N;
		int sum = 0;
		while(N != 0){
			sum += N%10;
			N /= 10;
		}
		System.out.println(M%sum == 0? "Yes": "No");
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	int M = N;
		int sum = 0;
		while(N != 0){
			sum += N%10;
			N /= 10;
		}
		System.out.println(M%sum == 0? "Yes": "No");
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	int M = N;
		int sum = 0;
		while(N != 0){
			sum += N%10;
			N /= 10;
		}
		System.out.println(M%sum == 0? "Yes": "No");
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	int M = N;
		int sum = 0;
		while(N != 0){
			sum += N%10;
			N /= 10;
		}
		System.out.println(M%sum == 0? "Yes": "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = N; M N int sum = 0; sum 0 while(N != 0){
			sum += N%10;
			N /= 10;
		} N != 0 N 0 {
			sum += N%10;
			N /= 10;
		} sum += N%10 sum N%10 N 10 N /= 10 N 10 System.out.println(M%sum == 0? "Yes": "No") System.out.println System.out System System.out M%sum == 0? "Yes": "No" M%sum == 0 M%sum M sum 0 "Yes" "No" String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	int M = N;
		int sum = 0;
		while(N != 0){
			sum += N%10;
			N /= 10;
		}
		System.out.println(M%sum == 0? "Yes": "No");
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	int M = N;
		int sum = 0;
		while(N != 0){
			sum += N%10;
			N /= 10;
		}
		System.out.println(M%sum == 0? "Yes": "No");
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
      	int M = N;
		int sum = 0;
		while(N != 0){
			sum += N%10;
			N /= 10;
		}
		System.out.println(M%sum == 0? "Yes": "No");
	}
}