
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String n = sc.next();
		int N = Integer.parseInt(n);
		int sn[] = new int[n.length()];
		int S = 0;
		sc.close();

		for (int i = 0; i < n.length(); i++) {
			sn[i] = Integer.parseInt(n.substring(i, i + 1));
			S += sn[i];
		}

		if (N % S == 0) {
			System.out.print("Yes");
		} else {
			System.out.print("No");

		}

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String n = sc.next();
		int N = Integer.parseInt(n);
		int sn[] = new int[n.length()];
		int S = 0;
		sc.close();

		for (int i = 0; i < n.length(); i++) {
			sn[i] = Integer.parseInt(n.substring(i, i + 1));
			S += sn[i];
		}

		if (N % S == 0) {
			System.out.print("Yes");
		} else {
			System.out.print("No");

		}

	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String n = sc.next();
		int N = Integer.parseInt(n);
		int sn[] = new int[n.length()];
		int S = 0;
		sc.close();

		for (int i = 0; i < n.length(); i++) {
			sn[i] = Integer.parseInt(n.substring(i, i + 1));
			S += sn[i];
		}

		if (N % S == 0) {
			System.out.print("Yes");
		} else {
			System.out.print("No");

		}

	} main {

		Scanner sc = new Scanner(System.in);

		String n = sc.next();
		int N = Integer.parseInt(n);
		int sn[] = new int[n.length()];
		int S = 0;
		sc.close();

		for (int i = 0; i < n.length(); i++) {
			sn[i] = Integer.parseInt(n.substring(i, i + 1));
			S += sn[i];
		}

		if (N % S == 0) {
			System.out.print("Yes");
		} else {
			System.out.print("No");

		}

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String n = sc.next(); n sc.next() sc.next sc int N = Integer.parseInt(n); N Integer.parseInt(n) Integer.parseInt Integer n int sn[] = new int[n.length()]; sn new int[n.length()] n.length() n.length n int S = 0; S 0 sc.close() sc.close sc for (int i = 0; i < n.length(); i++) {
			sn[i] = Integer.parseInt(n.substring(i, i + 1));
			S += sn[i];
		} int i = 0; int i = 0; i 0 i < n.length() i n.length() n.length n i++ i++ i {
			sn[i] = Integer.parseInt(n.substring(i, i + 1));
			S += sn[i];
		} {
			sn[i] = Integer.parseInt(n.substring(i, i + 1));
			S += sn[i];
		} sn[i] = Integer.parseInt(n.substring(i, i + 1)) sn[i] sn i Integer.parseInt(n.substring(i, i + 1)) Integer.parseInt Integer n.substring(i, i + 1) n.substring n i i + 1 i 1 S += sn[i] S sn[i] sn i if (N % S == 0) {
			System.out.print("Yes");
		} else {
			System.out.print("No");

		} N % S == 0 N % S N S 0 {
			System.out.print("Yes");
		} System.out.print("Yes") System.out.print System.out System System.out "Yes" {
			System.out.print("No");

		} System.out.print("No") System.out.print 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 n = sc.next();
		int N = Integer.parseInt(n);
		int sn[] = new int[n.length()];
		int S = 0;
		sc.close();

		for (int i = 0; i < n.length(); i++) {
			sn[i] = Integer.parseInt(n.substring(i, i + 1));
			S += sn[i];
		}

		if (N % S == 0) {
			System.out.print("Yes");
		} else {
			System.out.print("No");

		}

	}
} public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String n = sc.next();
		int N = Integer.parseInt(n);
		int sn[] = new int[n.length()];
		int S = 0;
		sc.close();

		for (int i = 0; i < n.length(); i++) {
			sn[i] = Integer.parseInt(n.substring(i, i + 1));
			S += sn[i];
		}

		if (N % S == 0) {
			System.out.print("Yes");
		} else {
			System.out.print("No");

		}

	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		String n = sc.next();
		int N = Integer.parseInt(n);
		int sn[] = new int[n.length()];
		int S = 0;
		sc.close();

		for (int i = 0; i < n.length(); i++) {
			sn[i] = Integer.parseInt(n.substring(i, i + 1));
			S += sn[i];
		}

		if (N % S == 0) {
			System.out.print("Yes");
		} else {
			System.out.print("No");

		}

	}
}