import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int N, SN;
		N = Integer.parseInt(S);
		SN = 0;
		int N2 = N;
		for (int i = 0; i < S.length(); i++) {
			SN += N2 % 10;
			N2 /= 10;
		}
		System.out.println(N % SN == 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);
		String S = sc.next();
		int N, SN;
		N = Integer.parseInt(S);
		SN = 0;
		int N2 = N;
		for (int i = 0; i < S.length(); i++) {
			SN += N2 % 10;
			N2 /= 10;
		}
		System.out.println(N % SN == 0 ? "Yes" : "No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int N, SN;
		N = Integer.parseInt(S);
		SN = 0;
		int N2 = N;
		for (int i = 0; i < S.length(); i++) {
			SN += N2 % 10;
			N2 /= 10;
		}
		System.out.println(N % SN == 0 ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int N, SN;
		N = Integer.parseInt(S);
		SN = 0;
		int N2 = N;
		for (int i = 0; i < S.length(); i++) {
			SN += N2 % 10;
			N2 /= 10;
		}
		System.out.println(N % SN == 0 ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int N N SN; SN N = Integer.parseInt(S) N Integer.parseInt(S) Integer.parseInt Integer S SN = 0 SN 0 int N2 = N; N2 N for (int i = 0; i < S.length(); i++) {
			SN += N2 % 10;
			N2 /= 10;
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			SN += N2 % 10;
			N2 /= 10;
		} {
			SN += N2 % 10;
			N2 /= 10;
		} SN += N2 % 10 SN N2 % 10 N2 10 N2 /= 10 N2 10 System.out.println(N % SN == 0 ? "Yes" : "No") System.out.println System.out System System.out N % SN == 0 ? "Yes" : "No" N % SN == 0 N % SN N SN 0 "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int N, SN;
		N = Integer.parseInt(S);
		SN = 0;
		int N2 = N;
		for (int i = 0; i < S.length(); i++) {
			SN += N2 % 10;
			N2 /= 10;
		}
		System.out.println(N % SN == 0 ? "Yes" : "No");
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int N, SN;
		N = Integer.parseInt(S);
		SN = 0;
		int N2 = N;
		for (int i = 0; i < S.length(); i++) {
			SN += N2 % 10;
			N2 /= 10;
		}
		System.out.println(N % SN == 0 ? "Yes" : "No");
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		int N, SN;
		N = Integer.parseInt(S);
		SN = 0;
		int N2 = N;
		for (int i = 0; i < S.length(); i++) {
			SN += N2 % 10;
			N2 /= 10;
		}
		System.out.println(N % SN == 0 ? "Yes" : "No");
	}
}