import java.util.Scanner;

public class Main {
  public static void main (String[] args) {
    Scanner input = new Scanner(System.in);

    while (input.hasNext()){
      int N = input.nextInt();

      if (N % digitSum(N) == 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    }
  }
  
  private static int digitSum (int N){
     int digitSum = 0;
     
     while(N > 0){
        digitSum += N % 10;
        N /= 10;
     }
    
     return digitSum;
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main (String[] args) {
    Scanner input = new Scanner(System.in);

    while (input.hasNext()){
      int N = input.nextInt();

      if (N % digitSum(N) == 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    }
  }
  
  private static int digitSum (int N){
     int digitSum = 0;
     
     while(N > 0){
        digitSum += N % 10;
        N /= 10;
     }
    
     return digitSum;
  }
} Main public static void main (String[] args) {
    Scanner input = new Scanner(System.in);

    while (input.hasNext()){
      int N = input.nextInt();

      if (N % digitSum(N) == 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    }
  } main {
    Scanner input = new Scanner(System.in);

    while (input.hasNext()){
      int N = input.nextInt();

      if (N % digitSum(N) == 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    }
  } Scanner input = new Scanner(System.in); input new Scanner(System.in) while (input.hasNext()){
      int N = input.nextInt();

      if (N % digitSum(N) == 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    } input.hasNext() input.hasNext input {
      int N = input.nextInt();

      if (N % digitSum(N) == 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    } int N = input.nextInt(); N input.nextInt() input.nextInt input if (N % digitSum(N) == 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      } N % digitSum(N) == 0 N % digitSum(N) N digitSum(N) digitSum N 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 private static int digitSum (int N){
     int digitSum = 0;
     
     while(N > 0){
        digitSum += N % 10;
        N /= 10;
     }
    
     return digitSum;
  } digitSum {
     int digitSum = 0;
     
     while(N > 0){
        digitSum += N % 10;
        N /= 10;
     }
    
     return digitSum;
  } int digitSum = 0; digitSum 0 while(N > 0){
        digitSum += N % 10;
        N /= 10;
     } N > 0 N 0 {
        digitSum += N % 10;
        N /= 10;
     } digitSum += N % 10 digitSum N % 10 N 10 N /= 10 N 10 return digitSum; digitSum int N N public class Main {
  public static void main (String[] args) {
    Scanner input = new Scanner(System.in);

    while (input.hasNext()){
      int N = input.nextInt();

      if (N % digitSum(N) == 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    }
  }
  
  private static int digitSum (int N){
     int digitSum = 0;
     
     while(N > 0){
        digitSum += N % 10;
        N /= 10;
     }
    
     return digitSum;
  }
} public class Main {
  public static void main (String[] args) {
    Scanner input = new Scanner(System.in);

    while (input.hasNext()){
      int N = input.nextInt();

      if (N % digitSum(N) == 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    }
  }
  
  private static int digitSum (int N){
     int digitSum = 0;
     
     while(N > 0){
        digitSum += N % 10;
        N /= 10;
     }
    
     return digitSum;
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main (String[] args) {
    Scanner input = new Scanner(System.in);

    while (input.hasNext()){
      int N = input.nextInt();

      if (N % digitSum(N) == 0) {
        System.out.println("Yes");
      } else {
        System.out.println("No");
      }
    }
  }
  
  private static int digitSum (int N){
     int digitSum = 0;
     
     while(N > 0){
        digitSum += N % 10;
        N /= 10;
     }
    
     return digitSum;
  }
}