import java.util.*;

public class Main {

  private static final int MAX_COUNT = 999;

  public static void main(String[] args) {
    Main m = new Main();
    m.exec();
  }

  private void exec() {
    Scanner scan = new Scanner(System.in);
    String n = scan.next();
    int num = Integer.parseInt(n);
    int sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += Integer.parseInt(n.substring(i, i + 1));
    }
    if (num % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }

    scan.close();
  }
} import java.util.*; util.* java public class Main {

  private static final int MAX_COUNT = 999;

  public static void main(String[] args) {
    Main m = new Main();
    m.exec();
  }

  private void exec() {
    Scanner scan = new Scanner(System.in);
    String n = scan.next();
    int num = Integer.parseInt(n);
    int sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += Integer.parseInt(n.substring(i, i + 1));
    }
    if (num % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }

    scan.close();
  }
} Main private static final int MAX_COUNT = 999; MAX_COUNT 999 public static void main(String[] args) {
    Main m = new Main();
    m.exec();
  } main {
    Main m = new Main();
    m.exec();
  } Main m = new Main(); m new Main() m.exec() m.exec m String[] args args private void exec() {
    Scanner scan = new Scanner(System.in);
    String n = scan.next();
    int num = Integer.parseInt(n);
    int sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += Integer.parseInt(n.substring(i, i + 1));
    }
    if (num % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }

    scan.close();
  } exec {
    Scanner scan = new Scanner(System.in);
    String n = scan.next();
    int num = Integer.parseInt(n);
    int sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += Integer.parseInt(n.substring(i, i + 1));
    }
    if (num % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }

    scan.close();
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String n = scan.next(); n scan.next() scan.next scan int num = Integer.parseInt(n); num Integer.parseInt(n) Integer.parseInt Integer n int sum = 0; sum 0 for (int i = 0; i < n.length(); i++) {
      sum += Integer.parseInt(n.substring(i, i + 1));
    } int i = 0; int i = 0; i 0 i < n.length() i n.length() n.length n i++ i++ i {
      sum += Integer.parseInt(n.substring(i, i + 1));
    } {
      sum += Integer.parseInt(n.substring(i, i + 1));
    } sum += Integer.parseInt(n.substring(i, i + 1)) sum Integer.parseInt(n.substring(i, i + 1)) Integer.parseInt Integer n.substring(i, i + 1) n.substring n i i + 1 i 1 if (num % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    } num % sum == 0 num % sum num sum 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" scan.close() scan.close scan public class Main {

  private static final int MAX_COUNT = 999;

  public static void main(String[] args) {
    Main m = new Main();
    m.exec();
  }

  private void exec() {
    Scanner scan = new Scanner(System.in);
    String n = scan.next();
    int num = Integer.parseInt(n);
    int sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += Integer.parseInt(n.substring(i, i + 1));
    }
    if (num % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }

    scan.close();
  }
} public class Main {

  private static final int MAX_COUNT = 999;

  public static void main(String[] args) {
    Main m = new Main();
    m.exec();
  }

  private void exec() {
    Scanner scan = new Scanner(System.in);
    String n = scan.next();
    int num = Integer.parseInt(n);
    int sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += Integer.parseInt(n.substring(i, i + 1));
    }
    if (num % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }

    scan.close();
  }
} Main
import java.util.*;

public class Main {

  private static final int MAX_COUNT = 999;

  public static void main(String[] args) {
    Main m = new Main();
    m.exec();
  }

  private void exec() {
    Scanner scan = new Scanner(System.in);
    String n = scan.next();
    int num = Integer.parseInt(n);
    int sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += Integer.parseInt(n.substring(i, i + 1));
    }
    if (num % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }

    scan.close();
  }
}