import java.util.*;

public class Main {
  
  public static void main(String[] args) {
    
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    String str = Integer.toString(N);
    int sum = 0;
    
    for (int i = 0; i < str.length(); i++) {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    }

    if (N % sum == 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 scan = new Scanner(System.in);
    int N = scan.nextInt();
    String str = Integer.toString(N);
    int sum = 0;
    
    for (int i = 0; i < str.length(); i++) {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    }

    if (N % sum == 0) {
      System.out.println("Yes");
      return;
    }
    
    System.out.println("No");
  }
} Main public static void main(String[] args) {
    
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    String str = Integer.toString(N);
    int sum = 0;
    
    for (int i = 0; i < str.length(); i++) {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    }

    if (N % sum == 0) {
      System.out.println("Yes");
      return;
    }
    
    System.out.println("No");
  } main {
    
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    String str = Integer.toString(N);
    int sum = 0;
    
    for (int i = 0; i < str.length(); i++) {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    }

    if (N % sum == 0) {
      System.out.println("Yes");
      return;
    }
    
    System.out.println("No");
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan String str = Integer.toString(N); str Integer.toString(N) Integer.toString Integer N int sum = 0; sum 0 for (int i = 0; i < str.length(); i++) {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    } {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    } char ch = str.charAt(i); ch str.charAt(i) str.charAt str i int c = Integer.parseInt(String.valueOf(ch)); c Integer.parseInt(String.valueOf(ch)) Integer.parseInt Integer String.valueOf(ch) String.valueOf String ch sum = sum + c sum sum + c sum c if (N % sum == 0) {
      System.out.println("Yes");
      return;
    } N % sum == 0 N % sum N sum 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 scan = new Scanner(System.in);
    int N = scan.nextInt();
    String str = Integer.toString(N);
    int sum = 0;
    
    for (int i = 0; i < str.length(); i++) {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    }

    if (N % sum == 0) {
      System.out.println("Yes");
      return;
    }
    
    System.out.println("No");
  }
} public class Main {
  
  public static void main(String[] args) {
    
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    String str = Integer.toString(N);
    int sum = 0;
    
    for (int i = 0; i < str.length(); i++) {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    }

    if (N % sum == 0) {
      System.out.println("Yes");
      return;
    }
    
    System.out.println("No");
  }
} Main
import java.util.*;

public class Main {
  
  public static void main(String[] args) {
    
    Scanner scan = new Scanner(System.in);
    int N = scan.nextInt();
    String str = Integer.toString(N);
    int sum = 0;
    
    for (int i = 0; i < str.length(); i++) {
      char ch = str.charAt(i);
      int c = Integer.parseInt(String.valueOf(ch));
      sum = sum + c;
    }

    if (N % sum == 0) {
      System.out.println("Yes");
      return;
    }
    
    System.out.println("No");
  }
}
