import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long n = Long.parseLong(s);
		long l = 0;
		for(char c : s.toCharArray()) {
			l+=c-'0';
		}
		System.out.println(n%l==0?"Yes":"No");
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long n = Long.parseLong(s);
		long l = 0;
		for(char c : s.toCharArray()) {
			l+=c-'0';
		}
		System.out.println(n%l==0?"Yes":"No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long n = Long.parseLong(s);
		long l = 0;
		for(char c : s.toCharArray()) {
			l+=c-'0';
		}
		System.out.println(n%l==0?"Yes":"No");
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long n = Long.parseLong(s);
		long l = 0;
		for(char c : s.toCharArray()) {
			l+=c-'0';
		}
		System.out.println(n%l==0?"Yes":"No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc long n = Long.parseLong(s); n Long.parseLong(s) Long.parseLong Long s long l = 0; l 0 for(char c : s.toCharArray()) {
			l+=c-'0';
		} char c s.toCharArray() s.toCharArray s {
			l+=c-'0';
		} {
			l+=c-'0';
		} l+=c-'0' l c-'0' c '0' System.out.println(n%l==0?"Yes":"No") System.out.println System.out System System.out n%l==0?"Yes":"No" n%l==0 n%l n l 0 "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long n = Long.parseLong(s);
		long l = 0;
		for(char c : s.toCharArray()) {
			l+=c-'0';
		}
		System.out.println(n%l==0?"Yes":"No");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long n = Long.parseLong(s);
		long l = 0;
		for(char c : s.toCharArray()) {
			l+=c-'0';
		}
		System.out.println(n%l==0?"Yes":"No");
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		long n = Long.parseLong(s);
		long l = 0;
		for(char c : s.toCharArray()) {
			l+=c-'0';
		}
		System.out.println(n%l==0?"Yes":"No");
	}
}