import java.io.IOException;
import java.util.Scanner;

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

		int n = sc.nextInt();
		int sum = 0;
		int tmp = n;

		while (tmp != 0) {
			sum += tmp % 10;
			tmp /= 10;
		}

		System.out.println(n % sum == 0 ? "Yes" : "No");

		sc.close();
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int sum = 0;
		int tmp = n;

		while (tmp != 0) {
			sum += tmp % 10;
			tmp /= 10;
		}

		System.out.println(n % sum == 0 ? "Yes" : "No");

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

		int n = sc.nextInt();
		int sum = 0;
		int tmp = n;

		while (tmp != 0) {
			sum += tmp % 10;
			tmp /= 10;
		}

		System.out.println(n % sum == 0 ? "Yes" : "No");

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

		int n = sc.nextInt();
		int sum = 0;
		int tmp = n;

		while (tmp != 0) {
			sum += tmp % 10;
			tmp /= 10;
		}

		System.out.println(n % sum == 0 ? "Yes" : "No");

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int sum = 0; sum 0 int tmp = n; tmp n while (tmp != 0) {
			sum += tmp % 10;
			tmp /= 10;
		} tmp != 0 tmp 0 {
			sum += tmp % 10;
			tmp /= 10;
		} sum += tmp % 10 sum tmp % 10 tmp 10 tmp /= 10 tmp 10 System.out.println(n % sum == 0 ? "Yes" : "No") System.out.println System.out System System.out n % sum == 0 ? "Yes" : "No" n % sum == 0 n % sum n sum 0 "Yes" "No" sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int sum = 0;
		int tmp = n;

		while (tmp != 0) {
			sum += tmp % 10;
			tmp /= 10;
		}

		System.out.println(n % sum == 0 ? "Yes" : "No");

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

		int n = sc.nextInt();
		int sum = 0;
		int tmp = n;

		while (tmp != 0) {
			sum += tmp % 10;
			tmp /= 10;
		}

		System.out.println(n % sum == 0 ? "Yes" : "No");

		sc.close();
	}
} Main
import java.io.IOException;
import java.util.Scanner;

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

		int n = sc.nextInt();
		int sum = 0;
		int tmp = n;

		while (tmp != 0) {
			sum += tmp % 10;
			tmp /= 10;
		}

		System.out.println(n % sum == 0 ? "Yes" : "No");

		sc.close();
	}
}
