
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;

/*Atcoder用
 * 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);


		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();
		for(char c:s)System.out.println(c);

		List<Integer> ls = new ArrayList<Integer>();
		String[] tmp = br.readLine().split(" ");
		for (int n = 0; n < N; n++) {
			ls.add(Integer.parseInt(tmp[n]));
		}
 */

public class Main {

	public static void main(String[] args) throws IOException {
 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String num = br.readLine();
 		String[] tmp = num.split("");

 		int N = Integer.parseInt(num);
		ArrayList<String> nls = new ArrayList<String>(Arrays.asList(tmp));

		int sum = 0;
		for(int i = 0;i<nls.size();i++){
			sum += Integer.parseInt(nls.get(i));
		}

		if(N%sum == 0)System.out.println("Yes");
		else System.out.println("No");

	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util public class Main {

	public static void main(String[] args) throws IOException {
 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String num = br.readLine();
 		String[] tmp = num.split("");

 		int N = Integer.parseInt(num);
		ArrayList<String> nls = new ArrayList<String>(Arrays.asList(tmp));

		int sum = 0;
		for(int i = 0;i<nls.size();i++){
			sum += Integer.parseInt(nls.get(i));
		}

		if(N%sum == 0)System.out.println("Yes");
		else System.out.println("No");

	}

} Main public static void main(String[] args) throws IOException {
 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String num = br.readLine();
 		String[] tmp = num.split("");

 		int N = Integer.parseInt(num);
		ArrayList<String> nls = new ArrayList<String>(Arrays.asList(tmp));

		int sum = 0;
		for(int i = 0;i<nls.size();i++){
			sum += Integer.parseInt(nls.get(i));
		}

		if(N%sum == 0)System.out.println("Yes");
		else System.out.println("No");

	} main {
 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String num = br.readLine();
 		String[] tmp = num.split("");

 		int N = Integer.parseInt(num);
		ArrayList<String> nls = new ArrayList<String>(Arrays.asList(tmp));

		int sum = 0;
		for(int i = 0;i<nls.size();i++){
			sum += Integer.parseInt(nls.get(i));
		}

		if(N%sum == 0)System.out.println("Yes");
		else System.out.println("No");

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String num = br.readLine(); num br.readLine() br.readLine br String[] tmp = num.split(""); tmp num.split("") num.split num "" int N = Integer.parseInt(num); N Integer.parseInt(num) Integer.parseInt Integer num ArrayList<String> nls = new ArrayList<String>(Arrays.asList(tmp)); nls new ArrayList<String>(Arrays.asList(tmp)) int sum = 0; sum 0 for(int i = 0;i<nls.size();i++){
			sum += Integer.parseInt(nls.get(i));
		} int i = 0; int i = 0; i 0 i<nls.size() i nls.size() nls.size nls i++ i++ i {
			sum += Integer.parseInt(nls.get(i));
		} {
			sum += Integer.parseInt(nls.get(i));
		} sum += Integer.parseInt(nls.get(i)) sum Integer.parseInt(nls.get(i)) Integer.parseInt Integer nls.get(i) nls.get nls i if(N%sum == 0)System.out.println("Yes");
		else System.out.println("No"); N%sum == 0 N%sum N sum 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

	public static void main(String[] args) throws IOException {
 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String num = br.readLine();
 		String[] tmp = num.split("");

 		int N = Integer.parseInt(num);
		ArrayList<String> nls = new ArrayList<String>(Arrays.asList(tmp));

		int sum = 0;
		for(int i = 0;i<nls.size();i++){
			sum += Integer.parseInt(nls.get(i));
		}

		if(N%sum == 0)System.out.println("Yes");
		else System.out.println("No");

	}

} public class Main {

	public static void main(String[] args) throws IOException {
 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String num = br.readLine();
 		String[] tmp = num.split("");

 		int N = Integer.parseInt(num);
		ArrayList<String> nls = new ArrayList<String>(Arrays.asList(tmp));

		int sum = 0;
		for(int i = 0;i<nls.size();i++){
			sum += Integer.parseInt(nls.get(i));
		}

		if(N%sum == 0)System.out.println("Yes");
		else System.out.println("No");

	}

} Main

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;

/*Atcoder用
 * 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] tmp = br.readLine().split(" ");
		int a = Integer.parseInt(tmp[0]);
		int b = Integer.parseInt(tmp[1]);
		int c = Integer.parseInt(tmp[2]);


		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String get = br.readLine();
		char[] s = get.toCharArray();
		for(char c:s)System.out.println(c);

		List<Integer> ls = new ArrayList<Integer>();
		String[] tmp = br.readLine().split(" ");
		for (int n = 0; n < N; n++) {
			ls.add(Integer.parseInt(tmp[n]));
		}
 */

public class Main {

	public static void main(String[] args) throws IOException {
 		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String num = br.readLine();
 		String[] tmp = num.split("");

 		int N = Integer.parseInt(num);
		ArrayList<String> nls = new ArrayList<String>(Arrays.asList(tmp));

		int sum = 0;
		for(int i = 0;i<nls.size();i++){
			sum += Integer.parseInt(nls.get(i));
		}

		if(N%sum == 0)System.out.println("Yes");
		else System.out.println("No");

	}

}
