import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n = String.valueOf(N);

		int num = 0;

		for (int i = 0; i < n.length(); i++) {
			num += Integer.valueOf(String.valueOf(n.charAt(i)));
		}

		System.out.println(N % num == 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);

		int N = sc.nextInt();
		String n = String.valueOf(N);

		int num = 0;

		for (int i = 0; i < n.length(); i++) {
			num += Integer.valueOf(String.valueOf(n.charAt(i)));
		}

		System.out.println(N % num == 0 ? "Yes" : "No");

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n = String.valueOf(N);

		int num = 0;

		for (int i = 0; i < n.length(); i++) {
			num += Integer.valueOf(String.valueOf(n.charAt(i)));
		}

		System.out.println(N % num == 0 ? "Yes" : "No");

	} main {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n = String.valueOf(N);

		int num = 0;

		for (int i = 0; i < n.length(); i++) {
			num += Integer.valueOf(String.valueOf(n.charAt(i)));
		}

		System.out.println(N % num == 0 ? "Yes" : "No");

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc String n = String.valueOf(N); n String.valueOf(N) String.valueOf String N int num = 0; num 0 for (int i = 0; i < n.length(); i++) {
			num += Integer.valueOf(String.valueOf(n.charAt(i)));
		} int i = 0; int i = 0; i 0 i < n.length() i n.length() n.length n i++ i++ i {
			num += Integer.valueOf(String.valueOf(n.charAt(i)));
		} {
			num += Integer.valueOf(String.valueOf(n.charAt(i)));
		} num += Integer.valueOf(String.valueOf(n.charAt(i))) num Integer.valueOf(String.valueOf(n.charAt(i))) Integer.valueOf Integer String.valueOf(n.charAt(i)) String.valueOf String n.charAt(i) n.charAt n i System.out.println(N % num == 0 ? "Yes" : "No") System.out.println System.out System System.out N % num == 0 ? "Yes" : "No" N % num == 0 N % num N num 0 "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n = String.valueOf(N);

		int num = 0;

		for (int i = 0; i < n.length(); i++) {
			num += Integer.valueOf(String.valueOf(n.charAt(i)));
		}

		System.out.println(N % num == 0 ? "Yes" : "No");

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n = String.valueOf(N);

		int num = 0;

		for (int i = 0; i < n.length(); i++) {
			num += Integer.valueOf(String.valueOf(n.charAt(i)));
		}

		System.out.println(N % num == 0 ? "Yes" : "No");

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		String n = String.valueOf(N);

		int num = 0;

		for (int i = 0; i < n.length(); i++) {
			num += Integer.valueOf(String.valueOf(n.charAt(i)));
		}

		System.out.println(N % num == 0 ? "Yes" : "No");

	}

}