import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int n=stdIn.nextInt(),s=0,t=n;
		do {
			s+=t%10;
			t/=10;
		}while(t!=0);
		System.out.print(n%s==0?"Yes":"No");
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int n=stdIn.nextInt(),s=0,t=n;
		do {
			s+=t%10;
			t/=10;
		}while(t!=0);
		System.out.print(n%s==0?"Yes":"No");
	}
} Main public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int n=stdIn.nextInt(),s=0,t=n;
		do {
			s+=t%10;
			t/=10;
		}while(t!=0);
		System.out.print(n%s==0?"Yes":"No");
	} main {
		Scanner stdIn=new Scanner(System.in);
		int n=stdIn.nextInt(),s=0,t=n;
		do {
			s+=t%10;
			t/=10;
		}while(t!=0);
		System.out.print(n%s==0?"Yes":"No");
	} Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) int n=stdIn.nextInt() n stdIn.nextInt() stdIn.nextInt stdIn s=0 s 0 t=n; t n do {
			s+=t%10;
			t/=10;
		}while(t!=0); t!=0 t 0 {
			s+=t%10;
			t/=10;
		} s+=t%10 s t%10 t 10 t/=10 t 10 System.out.print(n%s==0?"Yes":"No") System.out.print System.out System System.out n%s==0?"Yes":"No" n%s==0 n%s n s 0 "Yes" "No" String[] args args
import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner stdIn=new Scanner(System.in);
		int n=stdIn.nextInt(),s=0,t=n;
		do {
			s+=t%10;
			t/=10;
		}while(t!=0);
		System.out.print(n%s==0?"Yes":"No");
	}
}