import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
        int n = N;
        int m, s = 0;

		for(int i=10; i>0; i--){
          m = n/(int)(Math.pow(10,i));
          s = s + m;
          if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          }

        }
        s = s + n % 10;
		if(N % s == 0){
		  System.out.println("Yes");
        } else {
          System.out.println("No");
        }
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
        int n = N;
        int m, s = 0;

		for(int i=10; i>0; i--){
          m = n/(int)(Math.pow(10,i));
          s = s + m;
          if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          }

        }
        s = s + n % 10;
		if(N % s == 0){
		  System.out.println("Yes");
        } else {
          System.out.println("No");
        }
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
        int n = N;
        int m, s = 0;

		for(int i=10; i>0; i--){
          m = n/(int)(Math.pow(10,i));
          s = s + m;
          if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          }

        }
        s = s + n % 10;
		if(N % s == 0){
		  System.out.println("Yes");
        } else {
          System.out.println("No");
        }
	} main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
        int n = N;
        int m, s = 0;

		for(int i=10; i>0; i--){
          m = n/(int)(Math.pow(10,i));
          s = s + m;
          if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          }

        }
        s = s + n % 10;
		if(N % s == 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 n = N; n N int m m s = 0; s 0 for(int i=10; i>0; i--){
          m = n/(int)(Math.pow(10,i));
          s = s + m;
          if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          }

        } int i=10; int i=10; i 10 i>0 i 0 i-- i-- i {
          m = n/(int)(Math.pow(10,i));
          s = s + m;
          if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          }

        } {
          m = n/(int)(Math.pow(10,i));
          s = s + m;
          if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          }

        } m = n/(int)(Math.pow(10,i)) m n/(int)(Math.pow(10,i)) n (int)(Math.pow(10,i)) Math.pow Math 10 i s = s + m s s + m s m if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          } m != 0 m 0 {
            n = n - (int)(Math.pow(10,i))*m;
          } n = n - (int)(Math.pow(10,i))*m n n - (int)(Math.pow(10,i))*m n (int)(Math.pow(10,i))*m (int)(Math.pow(10,i)) Math.pow Math 10 i m s = s + n % 10 s s + n % 10 s n % 10 n 10 if(N % s == 0){
		  System.out.println("Yes");
        } else {
          System.out.println("No");
        } N % s == 0 N % s N s 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){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
        int n = N;
        int m, s = 0;

		for(int i=10; i>0; i--){
          m = n/(int)(Math.pow(10,i));
          s = s + m;
          if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          }

        }
        s = s + n % 10;
		if(N % s == 0){
		  System.out.println("Yes");
        } else {
          System.out.println("No");
        }
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
        int n = N;
        int m, s = 0;

		for(int i=10; i>0; i--){
          m = n/(int)(Math.pow(10,i));
          s = s + m;
          if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          }

        }
        s = s + n % 10;
		if(N % s == 0){
		  System.out.println("Yes");
        } else {
          System.out.println("No");
        }
	}
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
        int n = N;
        int m, s = 0;

		for(int i=10; i>0; i--){
          m = n/(int)(Math.pow(10,i));
          s = s + m;
          if(m != 0){
            n = n - (int)(Math.pow(10,i))*m;
          }

        }
        s = s + n % 10;
		if(N % s == 0){
		  System.out.println("Yes");
        } else {
          System.out.println("No");
        }
	}
}