import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String[] strs = str.split("");
		int num = Integer.parseInt(str);
		int sum = 0;
		for(int i = 0; i < strs.length; i++) {
			sum += Integer.parseInt(strs[i]);
		}
		System.out.println(num%sum==0 ? "Yes" : "No");
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String[] strs = str.split("");
		int num = Integer.parseInt(str);
		int sum = 0;
		for(int i = 0; i < strs.length; i++) {
			sum += Integer.parseInt(strs[i]);
		}
		System.out.println(num%sum==0 ? "Yes" : "No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String[] strs = str.split("");
		int num = Integer.parseInt(str);
		int sum = 0;
		for(int i = 0; i < strs.length; i++) {
			sum += Integer.parseInt(strs[i]);
		}
		System.out.println(num%sum==0 ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String[] strs = str.split("");
		int num = Integer.parseInt(str);
		int sum = 0;
		for(int i = 0; i < strs.length; i++) {
			sum += Integer.parseInt(strs[i]);
		}
		System.out.println(num%sum==0 ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc String[] strs = str.split(""); strs str.split("") str.split str "" int num = Integer.parseInt(str); num Integer.parseInt(str) Integer.parseInt Integer str int sum = 0; sum 0 for(int i = 0; i < strs.length; i++) {
			sum += Integer.parseInt(strs[i]);
		} int i = 0; int i = 0; i 0 i < strs.length i strs.length strs strs.length i++ i++ i {
			sum += Integer.parseInt(strs[i]);
		} {
			sum += Integer.parseInt(strs[i]);
		} sum += Integer.parseInt(strs[i]) sum Integer.parseInt(strs[i]) Integer.parseInt Integer strs[i] strs i System.out.println(num%sum==0 ? "Yes" : "No") System.out.println System.out System System.out num%sum==0 ? "Yes" : "No" num%sum==0 num%sum num sum 0 "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String[] strs = str.split("");
		int num = Integer.parseInt(str);
		int sum = 0;
		for(int i = 0; i < strs.length; i++) {
			sum += Integer.parseInt(strs[i]);
		}
		System.out.println(num%sum==0 ? "Yes" : "No");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String[] strs = str.split("");
		int num = Integer.parseInt(str);
		int sum = 0;
		for(int i = 0; i < strs.length; i++) {
			sum += Integer.parseInt(strs[i]);
		}
		System.out.println(num%sum==0 ? "Yes" : "No");
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		String[] strs = str.split("");
		int num = Integer.parseInt(str);
		int sum = 0;
		for(int i = 0; i < strs.length; i++) {
			sum += Integer.parseInt(strs[i]);
		}
		System.out.println(num%sum==0 ? "Yes" : "No");
	}
}