import java.util.*;
import java.io.*;

public class Main {
  public static void main(String[] args) throws Exception {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = new String(in.readLine());
    int N = Integer.parseInt(s);
    int sumN = 0;
    
    for(int i = 0; i < s.length(); i++){
      sumN += Character.getNumericValue(s.charAt(i));
    }
    
    if(N % sumN == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
  public static void main(String[] args) throws Exception {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = new String(in.readLine());
    int N = Integer.parseInt(s);
    int sumN = 0;
    
    for(int i = 0; i < s.length(); i++){
      sumN += Character.getNumericValue(s.charAt(i));
    }
    
    if(N % sumN == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} Main public static void main(String[] args) throws Exception {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = new String(in.readLine());
    int N = Integer.parseInt(s);
    int sumN = 0;
    
    for(int i = 0; i < s.length(); i++){
      sumN += Character.getNumericValue(s.charAt(i));
    }
    
    if(N % sumN == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = new String(in.readLine());
    int N = Integer.parseInt(s);
    int sumN = 0;
    
    for(int i = 0; i < s.length(); i++){
      sumN += Character.getNumericValue(s.charAt(i));
    }
    
    if(N % sumN == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String s = new String(in.readLine()); s new String(in.readLine()) int N = Integer.parseInt(s); N Integer.parseInt(s) Integer.parseInt Integer s int sumN = 0; sumN 0 for(int i = 0; i < s.length(); i++){
      sumN += Character.getNumericValue(s.charAt(i));
    } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
      sumN += Character.getNumericValue(s.charAt(i));
    } {
      sumN += Character.getNumericValue(s.charAt(i));
    } sumN += Character.getNumericValue(s.charAt(i)) sumN Character.getNumericValue(s.charAt(i)) Character.getNumericValue Character s.charAt(i) s.charAt s i if(N % sumN == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    } N % sumN == 0 N % sumN N sumN 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) throws Exception {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = new String(in.readLine());
    int N = Integer.parseInt(s);
    int sumN = 0;
    
    for(int i = 0; i < s.length(); i++){
      sumN += Character.getNumericValue(s.charAt(i));
    }
    
    if(N % sumN == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} public class Main {
  public static void main(String[] args) throws Exception {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = new String(in.readLine());
    int N = Integer.parseInt(s);
    int sumN = 0;
    
    for(int i = 0; i < s.length(); i++){
      sumN += Character.getNumericValue(s.charAt(i));
    }
    
    if(N % sumN == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} Main
import java.util.*;
import java.io.*;

public class Main {
  public static void main(String[] args) throws Exception {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = new String(in.readLine());
    int N = Integer.parseInt(s);
    int sumN = 0;
    
    for(int i = 0; i < s.length(); i++){
      sumN += Character.getNumericValue(s.charAt(i));
    }
    
    if(N % sumN == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}
