
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int target = n;
		int sum = 0;
		while (target > 0) {
			sum += target % 10;
			target /= 10;
		}
		System.out.println(n % sum == 0 ? "Yes" : "No");
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int target = n;
		int sum = 0;
		while (target > 0) {
			sum += target % 10;
			target /= 10;
		}
		System.out.println(n % sum == 0 ? "Yes" : "No");
		sc.close();
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int target = n;
		int sum = 0;
		while (target > 0) {
			sum += target % 10;
			target /= 10;
		}
		System.out.println(n % sum == 0 ? "Yes" : "No");
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int target = n;
		int sum = 0;
		while (target > 0) {
			sum += target % 10;
			target /= 10;
		}
		System.out.println(n % sum == 0 ? "Yes" : "No");
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int target = n; target n int sum = 0; sum 0 while (target > 0) {
			sum += target % 10;
			target /= 10;
		} target > 0 target 0 {
			sum += target % 10;
			target /= 10;
		} sum += target % 10 sum target % 10 target 10 target /= 10 target 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 Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int target = n;
		int sum = 0;
		while (target > 0) {
			sum += target % 10;
			target /= 10;
		}
		System.out.println(n % sum == 0 ? "Yes" : "No");
		sc.close();
	}
} public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int target = n;
		int sum = 0;
		while (target > 0) {
			sum += target % 10;
			target /= 10;
		}
		System.out.println(n % sum == 0 ? "Yes" : "No");
		sc.close();
	}
} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = Integer.parseInt(sc.next());
		int target = n;
		int sum = 0;
		while (target > 0) {
			sum += target % 10;
			target /= 10;
		}
		System.out.println(n % sum == 0 ? "Yes" : "No");
		sc.close();
	}
}