import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int s = 0;
		int temp = n;
		
		for (int i = 9; i >= 0; i--) {
			s += temp / (int)Math.pow(10, i);
			temp = temp % (int)Math.pow(10, i);
		}
		
		System.out.println(n % s == 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 = Integer.parseInt(sc.next());
		int s = 0;
		int temp = n;
		
		for (int i = 9; i >= 0; i--) {
			s += temp / (int)Math.pow(10, i);
			temp = temp % (int)Math.pow(10, i);
		}
		
		System.out.println(n % s == 0 ? "Yes" : "No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int s = 0;
		int temp = n;
		
		for (int i = 9; i >= 0; i--) {
			s += temp / (int)Math.pow(10, i);
			temp = temp % (int)Math.pow(10, i);
		}
		
		System.out.println(n % s == 0 ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int s = 0;
		int temp = n;
		
		for (int i = 9; i >= 0; i--) {
			s += temp / (int)Math.pow(10, i);
			temp = temp % (int)Math.pow(10, i);
		}
		
		System.out.println(n % s == 0 ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int s = 0; s 0 int temp = n; temp n for (int i = 9; i >= 0; i--) {
			s += temp / (int)Math.pow(10, i);
			temp = temp % (int)Math.pow(10, i);
		} int i = 9; int i = 9; i 9 i >= 0 i 0 i-- i-- i {
			s += temp / (int)Math.pow(10, i);
			temp = temp % (int)Math.pow(10, i);
		} {
			s += temp / (int)Math.pow(10, i);
			temp = temp % (int)Math.pow(10, i);
		} s += temp / (int)Math.pow(10, i) s temp / (int)Math.pow(10, i) temp (int)Math.pow(10, i) Math.pow Math 10 i temp = temp % (int)Math.pow(10, i) temp temp % (int)Math.pow(10, i) temp (int)Math.pow(10, i) Math.pow Math 10 i System.out.println(n % s == 0 ? "Yes" : "No") System.out.println System.out System System.out n % s == 0 ? "Yes" : "No" n % s == 0 n % s n s 0 "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int s = 0;
		int temp = n;
		
		for (int i = 9; i >= 0; i--) {
			s += temp / (int)Math.pow(10, i);
			temp = temp % (int)Math.pow(10, i);
		}
		
		System.out.println(n % s == 0 ? "Yes" : "No");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int s = 0;
		int temp = n;
		
		for (int i = 9; i >= 0; i--) {
			s += temp / (int)Math.pow(10, i);
			temp = temp % (int)Math.pow(10, i);
		}
		
		System.out.println(n % s == 0 ? "Yes" : "No");
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int s = 0;
		int temp = n;
		
		for (int i = 9; i >= 0; i--) {
			s += temp / (int)Math.pow(10, i);
			temp = temp % (int)Math.pow(10, i);
		}
		
		System.out.println(n % s == 0 ? "Yes" : "No");
	}
}