import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Sn = 0;
		String NS = String.valueOf(N);
		for(int i = 0;i < NS.length(); i++) {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		}
		if(N % Sn == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Sn = 0;
		String NS = String.valueOf(N);
		for(int i = 0;i < NS.length(); i++) {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		}
		if(N % Sn == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Sn = 0;
		String NS = String.valueOf(N);
		for(int i = 0;i < NS.length(); i++) {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		}
		if(N % Sn == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Sn = 0;
		String NS = String.valueOf(N);
		for(int i = 0;i < NS.length(); i++) {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		}
		if(N % Sn == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int Sn = 0; Sn 0 String NS = String.valueOf(N); NS String.valueOf(N) String.valueOf String N for(int i = 0;i < NS.length(); i++) {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		} int i = 0; int i = 0; i 0 i < NS.length() i NS.length() NS.length NS i++ i++ i {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		} {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		} Sn += Integer.parseInt(String.valueOf(NS.charAt(i))) Sn Integer.parseInt(String.valueOf(NS.charAt(i))) Integer.parseInt Integer String.valueOf(NS.charAt(i)) String.valueOf String NS.charAt(i) NS.charAt NS i if(N % Sn == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} N % Sn == 0 N % Sn N Sn 0 {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} 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) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Sn = 0;
		String NS = String.valueOf(N);
		for(int i = 0;i < NS.length(); i++) {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		}
		if(N % Sn == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

} public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Sn = 0;
		String NS = String.valueOf(N);
		for(int i = 0;i < NS.length(); i++) {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		}
		if(N % Sn == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int Sn = 0;
		String NS = String.valueOf(N);
		for(int i = 0;i < NS.length(); i++) {
			Sn += Integer.parseInt(String.valueOf(NS.charAt(i)));
		}
		if(N % Sn == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}

}