import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		int s=0;
		String ns=n+"";
		for(int i=0; i<ns.length(); i++) {
			s+=ns.charAt(i)-'0';
		}
		System.out.println((n%s==0?"Yes":"No"));
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		int s=0;
		String ns=n+"";
		for(int i=0; i<ns.length(); i++) {
			s+=ns.charAt(i)-'0';
		}
		System.out.println((n%s==0?"Yes":"No"));
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		int s=0;
		String ns=n+"";
		for(int i=0; i<ns.length(); i++) {
			s+=ns.charAt(i)-'0';
		}
		System.out.println((n%s==0?"Yes":"No"));
	} main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		int s=0;
		String ns=n+"";
		for(int i=0; i<ns.length(); i++) {
			s+=ns.charAt(i)-'0';
		}
		System.out.println((n%s==0?"Yes":"No"));
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int s=0; s 0 String ns=n+""; ns n+"" n "" for(int i=0; i<ns.length(); i++) {
			s+=ns.charAt(i)-'0';
		} int i=0; int i=0; i 0 i<ns.length() i ns.length() ns.length ns i++ i++ i {
			s+=ns.charAt(i)-'0';
		} {
			s+=ns.charAt(i)-'0';
		} s+=ns.charAt(i)-'0' s ns.charAt(i)-'0' ns.charAt(i) ns.charAt ns i '0' System.out.println((n%s==0?"Yes":"No")) System.out.println System.out System System.out (n%s==0?"Yes":"No") n%s==0 n%s n s 0 "Yes" "No" String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		int s=0;
		String ns=n+"";
		for(int i=0; i<ns.length(); i++) {
			s+=ns.charAt(i)-'0';
		}
		System.out.println((n%s==0?"Yes":"No"));
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		int s=0;
		String ns=n+"";
		for(int i=0; i<ns.length(); i++) {
			s+=ns.charAt(i)-'0';
		}
		System.out.println((n%s==0?"Yes":"No"));
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		int s=0;
		String ns=n+"";
		for(int i=0; i<ns.length(); i++) {
			s+=ns.charAt(i)-'0';
		}
		System.out.println((n%s==0?"Yes":"No"));
	}
}