import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int num = N;
        int s = 0;
        while(num != 0){
            s += num % 10;
            num /= 10;
            //System.out.println("s:"+s);
            //System.out.println("num:"+num);
        }
        System.out.println(N % s == 0? "Yes":"No");
		

	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int num = N;
        int s = 0;
        while(num != 0){
            s += num % 10;
            num /= 10;
            //System.out.println("s:"+s);
            //System.out.println("num:"+num);
        }
        System.out.println(N % s == 0? "Yes":"No");
		

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int num = N;
        int s = 0;
        while(num != 0){
            s += num % 10;
            num /= 10;
            //System.out.println("s:"+s);
            //System.out.println("num:"+num);
        }
        System.out.println(N % s == 0? "Yes":"No");
		

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int num = N;
        int s = 0;
        while(num != 0){
            s += num % 10;
            num /= 10;
            //System.out.println("s:"+s);
            //System.out.println("num:"+num);
        }
        System.out.println(N % s == 0? "Yes":"No");
		

	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int num = N; num N int s = 0; s 0 while(num != 0){
            s += num % 10;
            num /= 10;
            //System.out.println("s:"+s);
            //System.out.println("num:"+num);
        } num != 0 num 0 {
            s += num % 10;
            num /= 10;
            //System.out.println("s:"+s);
            //System.out.println("num:"+num);
        } s += num % 10 s num % 10 num 10 num /= 10 num 10 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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int num = N;
        int s = 0;
        while(num != 0){
            s += num % 10;
            num /= 10;
            //System.out.println("s:"+s);
            //System.out.println("num:"+num);
        }
        System.out.println(N % s == 0? "Yes":"No");
		

	}

} public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int num = N;
        int s = 0;
        while(num != 0){
            s += num % 10;
            num /= 10;
            //System.out.println("s:"+s);
            //System.out.println("num:"+num);
        }
        System.out.println(N % s == 0? "Yes":"No");
		

	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		
		int num = N;
        int s = 0;
        while(num != 0){
            s += num % 10;
            num /= 10;
            //System.out.println("s:"+s);
            //System.out.println("num:"+num);
        }
        System.out.println(N % s == 0? "Yes":"No");
		

	}

}