import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n, m, sn = 0;
		n = sc.nextLong();
		m = n;
		while(m > 0) {
			sn += m % 10;
			m /= 10;
		}
		System.out.println(n % sn == 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);
		long n, m, sn = 0;
		n = sc.nextLong();
		m = n;
		while(m > 0) {
			sn += m % 10;
			m /= 10;
		}
		System.out.println(n % sn == 0 ? "Yes" : "No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n, m, sn = 0;
		n = sc.nextLong();
		m = n;
		while(m > 0) {
			sn += m % 10;
			m /= 10;
		}
		System.out.println(n % sn == 0 ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		long n, m, sn = 0;
		n = sc.nextLong();
		m = n;
		while(m > 0) {
			sn += m % 10;
			m /= 10;
		}
		System.out.println(n % sn == 0 ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n n m m sn = 0; sn 0 n = sc.nextLong() n sc.nextLong() sc.nextLong sc m = n m n while(m > 0) {
			sn += m % 10;
			m /= 10;
		} m > 0 m 0 {
			sn += m % 10;
			m /= 10;
		} sn += m % 10 sn m % 10 m 10 m /= 10 m 10 System.out.println(n % sn == 0 ? "Yes" : "No") System.out.println System.out System System.out n % sn == 0 ? "Yes" : "No" n % sn == 0 n % sn n sn 0 "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n, m, sn = 0;
		n = sc.nextLong();
		m = n;
		while(m > 0) {
			sn += m % 10;
			m /= 10;
		}
		System.out.println(n % sn == 0 ? "Yes" : "No");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n, m, sn = 0;
		n = sc.nextLong();
		m = n;
		while(m > 0) {
			sn += m % 10;
			m /= 10;
		}
		System.out.println(n % sn == 0 ? "Yes" : "No");
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n, m, sn = 0;
		n = sc.nextLong();
		m = n;
		while(m > 0) {
			sn += m % 10;
			m /= 10;
		}
		System.out.println(n % sn == 0 ? "Yes" : "No");
	}
}