import java.util.*;

public class Main {
 public static void main(String args[]) {
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   char[] nChar = String.valueOf(n).toCharArray();
   int sn = 0;
   for (int i = 0; i < nChar.length; i++) {
          sn += Integer.parseInt(String.valueOf(nChar[i]));
   }
   if(n % sn == 0) {
      System.out.println("Yes");
      return;
   } 
   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();
   char[] nChar = String.valueOf(n).toCharArray();
   int sn = 0;
   for (int i = 0; i < nChar.length; i++) {
          sn += Integer.parseInt(String.valueOf(nChar[i]));
   }
   if(n % sn == 0) {
      System.out.println("Yes");
      return;
   } 
   System.out.println("No");
 }
} Main public static void main(String args[]) {
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   char[] nChar = String.valueOf(n).toCharArray();
   int sn = 0;
   for (int i = 0; i < nChar.length; i++) {
          sn += Integer.parseInt(String.valueOf(nChar[i]));
   }
   if(n % sn == 0) {
      System.out.println("Yes");
      return;
   } 
   System.out.println("No");
 } main {
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   char[] nChar = String.valueOf(n).toCharArray();
   int sn = 0;
   for (int i = 0; i < nChar.length; i++) {
          sn += Integer.parseInt(String.valueOf(nChar[i]));
   }
   if(n % sn == 0) {
      System.out.println("Yes");
      return;
   } 
   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 char[] nChar = String.valueOf(n).toCharArray(); nChar String.valueOf(n).toCharArray() String.valueOf(n).toCharArray String.valueOf(n) String.valueOf String n int sn = 0; sn 0 for (int i = 0; i < nChar.length; i++) {
          sn += Integer.parseInt(String.valueOf(nChar[i]));
   } int i = 0; int i = 0; i 0 i < nChar.length i nChar.length nChar nChar.length i++ i++ i {
          sn += Integer.parseInt(String.valueOf(nChar[i]));
   } {
          sn += Integer.parseInt(String.valueOf(nChar[i]));
   } sn += Integer.parseInt(String.valueOf(nChar[i])) sn Integer.parseInt(String.valueOf(nChar[i])) Integer.parseInt Integer String.valueOf(nChar[i]) String.valueOf String nChar[i] nChar i if(n % sn == 0) {
      System.out.println("Yes");
      return;
   } n % sn == 0 n % sn n sn 0 {
      System.out.println("Yes");
      return;
   } System.out.println("Yes") System.out.println System.out System System.out "Yes" return; 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();
   char[] nChar = String.valueOf(n).toCharArray();
   int sn = 0;
   for (int i = 0; i < nChar.length; i++) {
          sn += Integer.parseInt(String.valueOf(nChar[i]));
   }
   if(n % sn == 0) {
      System.out.println("Yes");
      return;
   } 
   System.out.println("No");
 }
} public class Main {
 public static void main(String args[]) {
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   char[] nChar = String.valueOf(n).toCharArray();
   int sn = 0;
   for (int i = 0; i < nChar.length; i++) {
          sn += Integer.parseInt(String.valueOf(nChar[i]));
   }
   if(n % sn == 0) {
      System.out.println("Yes");
      return;
   } 
   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();
   char[] nChar = String.valueOf(n).toCharArray();
   int sn = 0;
   for (int i = 0; i < nChar.length; i++) {
          sn += Integer.parseInt(String.valueOf(nChar[i]));
   }
   if(n % sn == 0) {
      System.out.println("Yes");
      return;
   } 
   System.out.println("No");
 }
}