import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n=scan.nextInt();
		scan.close();
		String nstr=String.valueOf(n);
		int sn=0;
		for(int i=0;i<nstr.length();i++) {
			sn+=Character.getNumericValue(nstr.charAt(i));
		}
		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 scan = new Scanner(System.in);
		int n=scan.nextInt();
		scan.close();
		String nstr=String.valueOf(n);
		int sn=0;
		for(int i=0;i<nstr.length();i++) {
			sn+=Character.getNumericValue(nstr.charAt(i));
		}
		System.out.println((n%sn==0)? "Yes":"No");
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n=scan.nextInt();
		scan.close();
		String nstr=String.valueOf(n);
		int sn=0;
		for(int i=0;i<nstr.length();i++) {
			sn+=Character.getNumericValue(nstr.charAt(i));
		}
		System.out.println((n%sn==0)? "Yes":"No");
	} main {
		Scanner scan = new Scanner(System.in);
		int n=scan.nextInt();
		scan.close();
		String nstr=String.valueOf(n);
		int sn=0;
		for(int i=0;i<nstr.length();i++) {
			sn+=Character.getNumericValue(nstr.charAt(i));
		}
		System.out.println((n%sn==0)? "Yes":"No");
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n=scan.nextInt(); n scan.nextInt() scan.nextInt scan scan.close() scan.close scan String nstr=String.valueOf(n); nstr String.valueOf(n) String.valueOf String n int sn=0; sn 0 for(int i=0;i<nstr.length();i++) {
			sn+=Character.getNumericValue(nstr.charAt(i));
		} int i=0; int i=0; i 0 i<nstr.length() i nstr.length() nstr.length nstr i++ i++ i {
			sn+=Character.getNumericValue(nstr.charAt(i));
		} {
			sn+=Character.getNumericValue(nstr.charAt(i));
		} sn+=Character.getNumericValue(nstr.charAt(i)) sn Character.getNumericValue(nstr.charAt(i)) Character.getNumericValue Character nstr.charAt(i) nstr.charAt nstr i 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 scan = new Scanner(System.in);
		int n=scan.nextInt();
		scan.close();
		String nstr=String.valueOf(n);
		int sn=0;
		for(int i=0;i<nstr.length();i++) {
			sn+=Character.getNumericValue(nstr.charAt(i));
		}
		System.out.println((n%sn==0)? "Yes":"No");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n=scan.nextInt();
		scan.close();
		String nstr=String.valueOf(n);
		int sn=0;
		for(int i=0;i<nstr.length();i++) {
			sn+=Character.getNumericValue(nstr.charAt(i));
		}
		System.out.println((n%sn==0)? "Yes":"No");
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n=scan.nextInt();
		scan.close();
		String nstr=String.valueOf(n);
		int sn=0;
		for(int i=0;i<nstr.length();i++) {
			sn+=Character.getNumericValue(nstr.charAt(i));
		}
		System.out.println((n%sn==0)? "Yes":"No");
	}
}