import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	/* --------------------------------------------------------------------
	   main
	 * -------------------------------------------------------------------- */
	public static void main(String args[]) throws Exception {

		// ----- input -----
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		String n = input.readLine();
		int num = Integer.parseInt(n);
		input.close();

		// ----- main -----
		int w = 0;
		for(int i=0; i < n.length(); i++) {
			w += Character.getNumericValue(n.charAt(i));
		}
		System.out.println(num%w==0?"Yes":"No");
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	/* --------------------------------------------------------------------
	   main
	 * -------------------------------------------------------------------- */
	public static void main(String args[]) throws Exception {

		// ----- input -----
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		String n = input.readLine();
		int num = Integer.parseInt(n);
		input.close();

		// ----- main -----
		int w = 0;
		for(int i=0; i < n.length(); i++) {
			w += Character.getNumericValue(n.charAt(i));
		}
		System.out.println(num%w==0?"Yes":"No");
	}
} Main /* --------------------------------------------------------------------
	   main
	 * -------------------------------------------------------------------- */
	public static void main(String args[]) throws Exception {

		// ----- input -----
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		String n = input.readLine();
		int num = Integer.parseInt(n);
		input.close();

		// ----- main -----
		int w = 0;
		for(int i=0; i < n.length(); i++) {
			w += Character.getNumericValue(n.charAt(i));
		}
		System.out.println(num%w==0?"Yes":"No");
	} main {

		// ----- input -----
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		String n = input.readLine();
		int num = Integer.parseInt(n);
		input.close();

		// ----- main -----
		int w = 0;
		for(int i=0; i < n.length(); i++) {
			w += Character.getNumericValue(n.charAt(i));
		}
		System.out.println(num%w==0?"Yes":"No");
	} BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) String n = input.readLine(); n input.readLine() input.readLine input int num = Integer.parseInt(n); num Integer.parseInt(n) Integer.parseInt Integer n input.close() input.close input int w = 0; w 0 for(int i=0; i < n.length(); i++) {
			w += Character.getNumericValue(n.charAt(i));
		} int i=0; int i=0; i 0 i < n.length() i n.length() n.length n i++ i++ i {
			w += Character.getNumericValue(n.charAt(i));
		} {
			w += Character.getNumericValue(n.charAt(i));
		} w += Character.getNumericValue(n.charAt(i)) w Character.getNumericValue(n.charAt(i)) Character.getNumericValue Character n.charAt(i) n.charAt n i System.out.println(num%w==0?"Yes":"No") System.out.println System.out System System.out num%w==0?"Yes":"No" num%w==0 num%w num w 0 "Yes" "No" String args[] args public class Main {

	/* --------------------------------------------------------------------
	   main
	 * -------------------------------------------------------------------- */
	public static void main(String args[]) throws Exception {

		// ----- input -----
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		String n = input.readLine();
		int num = Integer.parseInt(n);
		input.close();

		// ----- main -----
		int w = 0;
		for(int i=0; i < n.length(); i++) {
			w += Character.getNumericValue(n.charAt(i));
		}
		System.out.println(num%w==0?"Yes":"No");
	}
} public class Main {

	/* --------------------------------------------------------------------
	   main
	 * -------------------------------------------------------------------- */
	public static void main(String args[]) throws Exception {

		// ----- input -----
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		String n = input.readLine();
		int num = Integer.parseInt(n);
		input.close();

		// ----- main -----
		int w = 0;
		for(int i=0; i < n.length(); i++) {
			w += Character.getNumericValue(n.charAt(i));
		}
		System.out.println(num%w==0?"Yes":"No");
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	/* --------------------------------------------------------------------
	   main
	 * -------------------------------------------------------------------- */
	public static void main(String args[]) throws Exception {

		// ----- input -----
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		String n = input.readLine();
		int num = Integer.parseInt(n);
		input.close();

		// ----- main -----
		int w = 0;
		for(int i=0; i < n.length(); i++) {
			w += Character.getNumericValue(n.charAt(i));
		}
		System.out.println(num%w==0?"Yes":"No");
	}
}
