import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String x = sc.next();
		
		int N = Integer.parseInt(x);
		int S = 0;
		int a = 0;
		
		for(int i = 0; i < x.length(); i++) {
			a = (int)(N / Math.pow(10, i));
			S += a % 10;
		}
		
		if(N % S == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String x = sc.next();
		
		int N = Integer.parseInt(x);
		int S = 0;
		int a = 0;
		
		for(int i = 0; i < x.length(); i++) {
			a = (int)(N / Math.pow(10, i));
			S += a % 10;
		}
		
		if(N % S == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String x = sc.next();
		
		int N = Integer.parseInt(x);
		int S = 0;
		int a = 0;
		
		for(int i = 0; i < x.length(); i++) {
			a = (int)(N / Math.pow(10, i));
			S += a % 10;
		}
		
		if(N % S == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String x = sc.next();
		
		int N = Integer.parseInt(x);
		int S = 0;
		int a = 0;
		
		for(int i = 0; i < x.length(); i++) {
			a = (int)(N / Math.pow(10, i));
			S += a % 10;
		}
		
		if(N % S == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String x = sc.next(); x sc.next() sc.next sc int N = Integer.parseInt(x); N Integer.parseInt(x) Integer.parseInt Integer x int S = 0; S 0 int a = 0; a 0 for(int i = 0; i < x.length(); i++) {
			a = (int)(N / Math.pow(10, i));
			S += a % 10;
		} int i = 0; int i = 0; i 0 i < x.length() i x.length() x.length x i++ i++ i {
			a = (int)(N / Math.pow(10, i));
			S += a % 10;
		} {
			a = (int)(N / Math.pow(10, i));
			S += a % 10;
		} a = (int)(N / Math.pow(10, i)) a (int)(N / Math.pow(10, i)) N Math.pow(10, i) Math.pow Math 10 i S += a % 10 S a % 10 a 10 if(N % S == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} N % S == 0 N % S N S 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 class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String x = sc.next();
		
		int N = Integer.parseInt(x);
		int S = 0;
		int a = 0;
		
		for(int i = 0; i < x.length(); i++) {
			a = (int)(N / Math.pow(10, i));
			S += a % 10;
		}
		
		if(N % S == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String x = sc.next();
		
		int N = Integer.parseInt(x);
		int S = 0;
		int a = 0;
		
		for(int i = 0; i < x.length(); i++) {
			a = (int)(N / Math.pow(10, i));
			S += a % 10;
		}
		
		if(N % S == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String x = sc.next();
		
		int N = Integer.parseInt(x);
		int S = 0;
		int a = 0;
		
		for(int i = 0; i < x.length(); i++) {
			a = (int)(N / Math.pow(10, i));
			S += a % 10;
		}
		
		if(N % S == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
