import java.io.IOException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			sum += Integer.parseInt("" + s.charAt(i));
		}

		System.out.println(Integer.parseInt(s) % sum == 0 ? "Yes" : "No");

		sc.close();
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			sum += Integer.parseInt("" + s.charAt(i));
		}

		System.out.println(Integer.parseInt(s) % sum == 0 ? "Yes" : "No");

		sc.close();
	}
} Main public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			sum += Integer.parseInt("" + s.charAt(i));
		}

		System.out.println(Integer.parseInt(s) % sum == 0 ? "Yes" : "No");

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			sum += Integer.parseInt("" + s.charAt(i));
		}

		System.out.println(Integer.parseInt(s) % sum == 0 ? "Yes" : "No");

		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int sum = 0; sum 0 for (int i = 0; i < s.length(); i++) {
			sum += Integer.parseInt("" + s.charAt(i));
		} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
			sum += Integer.parseInt("" + s.charAt(i));
		} {
			sum += Integer.parseInt("" + s.charAt(i));
		} sum += Integer.parseInt("" + s.charAt(i)) sum Integer.parseInt("" + s.charAt(i)) Integer.parseInt Integer "" + s.charAt(i) "" s.charAt(i) s.charAt s i System.out.println(Integer.parseInt(s) % sum == 0 ? "Yes" : "No") System.out.println System.out System System.out Integer.parseInt(s) % sum == 0 ? "Yes" : "No" Integer.parseInt(s) % sum == 0 Integer.parseInt(s) % sum Integer.parseInt(s) Integer.parseInt Integer s sum 0 "Yes" "No" sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			sum += Integer.parseInt("" + s.charAt(i));
		}

		System.out.println(Integer.parseInt(s) % sum == 0 ? "Yes" : "No");

		sc.close();
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			sum += Integer.parseInt("" + s.charAt(i));
		}

		System.out.println(Integer.parseInt(s) % sum == 0 ? "Yes" : "No");

		sc.close();
	}
} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();

		int sum = 0;
		for (int i = 0; i < s.length(); i++) {
			sum += Integer.parseInt("" + s.charAt(i));
		}

		System.out.println(Integer.parseInt(s) % sum == 0 ? "Yes" : "No");

		sc.close();
	}
}
