import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String n = sc.next();
    int[] data = new int[n.length()];

    for (int i = 0; i < n.length(); i++) {
      data[i] = Integer.parseInt(n.substring(i,i+1));
    }

    long sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += data[i];
    }

    if (Integer.parseInt(n) % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} import java.util.*; util.* java public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String n = sc.next();
    int[] data = new int[n.length()];

    for (int i = 0; i < n.length(); i++) {
      data[i] = Integer.parseInt(n.substring(i,i+1));
    }

    long sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += data[i];
    }

    if (Integer.parseInt(n) % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String n = sc.next();
    int[] data = new int[n.length()];

    for (int i = 0; i < n.length(); i++) {
      data[i] = Integer.parseInt(n.substring(i,i+1));
    }

    long sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += data[i];
    }

    if (Integer.parseInt(n) % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    String n = sc.next();
    int[] data = new int[n.length()];

    for (int i = 0; i < n.length(); i++) {
      data[i] = Integer.parseInt(n.substring(i,i+1));
    }

    long sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += data[i];
    }

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

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String n = sc.next();
    int[] data = new int[n.length()];

    for (int i = 0; i < n.length(); i++) {
      data[i] = Integer.parseInt(n.substring(i,i+1));
    }

    long sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += data[i];
    }

    if (Integer.parseInt(n) % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String n = sc.next();
    int[] data = new int[n.length()];

    for (int i = 0; i < n.length(); i++) {
      data[i] = Integer.parseInt(n.substring(i,i+1));
    }

    long sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += data[i];
    }

    if (Integer.parseInt(n) % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
} Main
import java.util.*;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String n = sc.next();
    int[] data = new int[n.length()];

    for (int i = 0; i < n.length(); i++) {
      data[i] = Integer.parseInt(n.substring(i,i+1));
    }

    long sum = 0;
    for (int i = 0; i < n.length(); i++) {
      sum += data[i];
    }

    if (Integer.parseInt(n) % sum == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
}
