import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    
    int n = N;
    int sum = 0;
    while(n > 0){
      sum += n%10;
      n /= 10;
    }
    System.out.println(N%sum == 0 ? "Yes" : "No");
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    
    int n = N;
    int sum = 0;
    while(n > 0){
      sum += n%10;
      n /= 10;
    }
    System.out.println(N%sum == 0 ? "Yes" : "No");
  }
} Main public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    
    int n = N;
    int sum = 0;
    while(n > 0){
      sum += n%10;
      n /= 10;
    }
    System.out.println(N%sum == 0 ? "Yes" : "No");
  } main {
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    
    int n = N;
    int sum = 0;
    while(n > 0){
      sum += n%10;
      n /= 10;
    }
    System.out.println(N%sum == 0 ? "Yes" : "No");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int n = N; n N int sum = 0; sum 0 while(n > 0){
      sum += n%10;
      n /= 10;
    } n > 0 n 0 {
      sum += n%10;
      n /= 10;
    } sum += n%10 sum n%10 n 10 n /= 10 n 10 System.out.println(N%sum == 0 ? "Yes" : "No") System.out.println System.out System System.out N%sum == 0 ? "Yes" : "No" N%sum == 0 N%sum N sum 0 "Yes" "No" String[]args args public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    
    int n = N;
    int sum = 0;
    while(n > 0){
      sum += n%10;
      n /= 10;
    }
    System.out.println(N%sum == 0 ? "Yes" : "No");
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    
    int n = N;
    int sum = 0;
    while(n > 0){
      sum += n%10;
      n /= 10;
    }
    System.out.println(N%sum == 0 ? "Yes" : "No");
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    
    int n = N;
    int sum = 0;
    while(n > 0){
      sum += n%10;
      n /= 10;
    }
    System.out.println(N%sum == 0 ? "Yes" : "No");
  }
}