import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();
    long a = 0;
    long c_N = N;
    
    while (N != 0) {
      a += N % 10;
      N /= 10;
    }
    
    System.out.println(c_N % a == 0 ? "Yes" : "No");
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();
    long a = 0;
    long c_N = N;
    
    while (N != 0) {
      a += N % 10;
      N /= 10;
    }
    
    System.out.println(c_N % a == 0 ? "Yes" : "No");
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();
    long a = 0;
    long c_N = N;
    
    while (N != 0) {
      a += N % 10;
      N /= 10;
    }
    
    System.out.println(c_N % a == 0 ? "Yes" : "No");
  } main {
    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();
    long a = 0;
    long c_N = N;
    
    while (N != 0) {
      a += N % 10;
      N /= 10;
    }
    
    System.out.println(c_N % a == 0 ? "Yes" : "No");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long a = 0; a 0 long c_N = N; c_N N while (N != 0) {
      a += N % 10;
      N /= 10;
    } N != 0 N 0 {
      a += N % 10;
      N /= 10;
    } a += N % 10 a N % 10 N 10 N /= 10 N 10 System.out.println(c_N % a == 0 ? "Yes" : "No") System.out.println System.out System System.out c_N % a == 0 ? "Yes" : "No" c_N % a == 0 c_N % a c_N a 0 "Yes" "No" String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();
    long a = 0;
    long c_N = N;
    
    while (N != 0) {
      a += N % 10;
      N /= 10;
    }
    
    System.out.println(c_N % a == 0 ? "Yes" : "No");
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();
    long a = 0;
    long c_N = N;
    
    while (N != 0) {
      a += N % 10;
      N /= 10;
    }
    
    System.out.println(c_N % a == 0 ? "Yes" : "No");
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    long N = sc.nextLong();
    long a = 0;
    long c_N = N;
    
    while (N != 0) {
      a += N % 10;
      N /= 10;
    }
    
    System.out.println(c_N % a == 0 ? "Yes" : "No");
  }
}
