import java.util.*;

public class Main {

	public static int s(int n) {
		String sn = String.valueOf(n);
		int ans = 0;
		for (int i = 0; i < sn.length(); ++i) {
			int tmp = (int) (sn.charAt(i) - '0');
			ans += tmp;
		}

		return ans;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		String ans[] = {"Yes", "No"};
		int an = 0;
		int tmpans = s(n);
		if(n % tmpans != 0)an = 1;
		System.out.println(ans[an]);
	}

} import java.util.*; util.* java public class Main {

	public static int s(int n) {
		String sn = String.valueOf(n);
		int ans = 0;
		for (int i = 0; i < sn.length(); ++i) {
			int tmp = (int) (sn.charAt(i) - '0');
			ans += tmp;
		}

		return ans;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		String ans[] = {"Yes", "No"};
		int an = 0;
		int tmpans = s(n);
		if(n % tmpans != 0)an = 1;
		System.out.println(ans[an]);
	}

} Main public static int s(int n) {
		String sn = String.valueOf(n);
		int ans = 0;
		for (int i = 0; i < sn.length(); ++i) {
			int tmp = (int) (sn.charAt(i) - '0');
			ans += tmp;
		}

		return ans;
	} s {
		String sn = String.valueOf(n);
		int ans = 0;
		for (int i = 0; i < sn.length(); ++i) {
			int tmp = (int) (sn.charAt(i) - '0');
			ans += tmp;
		}

		return ans;
	} String sn = String.valueOf(n); sn String.valueOf(n) String.valueOf String n int ans = 0; ans 0 for (int i = 0; i < sn.length(); ++i) {
			int tmp = (int) (sn.charAt(i) - '0');
			ans += tmp;
		} int i = 0; int i = 0; i 0 i < sn.length() i sn.length() sn.length sn ++i ++i i {
			int tmp = (int) (sn.charAt(i) - '0');
			ans += tmp;
		} {
			int tmp = (int) (sn.charAt(i) - '0');
			ans += tmp;
		} int tmp = (int) (sn.charAt(i) - '0'); tmp (int) (sn.charAt(i) - '0') sn.charAt(i) sn.charAt sn i '0' ans += tmp ans tmp return ans; ans int n n public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		String ans[] = {"Yes", "No"};
		int an = 0;
		int tmpans = s(n);
		if(n % tmpans != 0)an = 1;
		System.out.println(ans[an]);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		String ans[] = {"Yes", "No"};
		int an = 0;
		int tmpans = s(n);
		if(n % tmpans != 0)an = 1;
		System.out.println(ans[an]);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc sc.close() sc.close sc String ans[] = {"Yes", "No"}; ans {"Yes", "No"} "Yes" "No" int an = 0; an 0 int tmpans = s(n); tmpans s(n) s n if(n % tmpans != 0)an = 1; n % tmpans != 0 n % tmpans n tmpans 0 an = 1 an 1 System.out.println(ans[an]) System.out.println System.out System System.out ans[an] ans an String[] args args public class Main {

	public static int s(int n) {
		String sn = String.valueOf(n);
		int ans = 0;
		for (int i = 0; i < sn.length(); ++i) {
			int tmp = (int) (sn.charAt(i) - '0');
			ans += tmp;
		}

		return ans;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		String ans[] = {"Yes", "No"};
		int an = 0;
		int tmpans = s(n);
		if(n % tmpans != 0)an = 1;
		System.out.println(ans[an]);
	}

} public class Main {

	public static int s(int n) {
		String sn = String.valueOf(n);
		int ans = 0;
		for (int i = 0; i < sn.length(); ++i) {
			int tmp = (int) (sn.charAt(i) - '0');
			ans += tmp;
		}

		return ans;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		String ans[] = {"Yes", "No"};
		int an = 0;
		int tmpans = s(n);
		if(n % tmpans != 0)an = 1;
		System.out.println(ans[an]);
	}

} Main
import java.util.*;

public class Main {

	public static int s(int n) {
		String sn = String.valueOf(n);
		int ans = 0;
		for (int i = 0; i < sn.length(); ++i) {
			int tmp = (int) (sn.charAt(i) - '0');
			ans += tmp;
		}

		return ans;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		String ans[] = {"Yes", "No"};
		int an = 0;
		int tmpans = s(n);
		if(n % tmpans != 0)an = 1;
		System.out.println(ans[an]);
	}

}
