import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int n = 0, sn = 0;
    for(int i = 0; i < str.length(); i++) {
      int a = str.charAt(i) - '0';
      n = a + n * 10;
      sn += a;
    }
    System.out.println(((n % sn == 0) ? "Yes" : "No"));
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int n = 0, sn = 0;
    for(int i = 0; i < str.length(); i++) {
      int a = str.charAt(i) - '0';
      n = a + n * 10;
      sn += a;
    }
    System.out.println(((n % sn == 0) ? "Yes" : "No"));
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int n = 0, sn = 0;
    for(int i = 0; i < str.length(); i++) {
      int a = str.charAt(i) - '0';
      n = a + n * 10;
      sn += a;
    }
    System.out.println(((n % sn == 0) ? "Yes" : "No"));
  } main {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int n = 0, sn = 0;
    for(int i = 0; i < str.length(); i++) {
      int a = str.charAt(i) - '0';
      n = a + n * 10;
      sn += a;
    }
    System.out.println(((n % sn == 0) ? "Yes" : "No"));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.next(); str sc.next() sc.next sc int n = 0 n 0 sn = 0; sn 0 for(int i = 0; i < str.length(); i++) {
      int a = str.charAt(i) - '0';
      n = a + n * 10;
      sn += a;
    } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
      int a = str.charAt(i) - '0';
      n = a + n * 10;
      sn += a;
    } {
      int a = str.charAt(i) - '0';
      n = a + n * 10;
      sn += a;
    } int a = str.charAt(i) - '0'; a str.charAt(i) - '0' str.charAt(i) str.charAt str i '0' n = a + n * 10 n a + n * 10 a n * 10 n 10 sn += a sn a System.out.println(((n % sn == 0) ? "Yes" : "No")) System.out.println System.out System System.out ((n % sn == 0) ? "Yes" : "No") (n % sn == 0) n % sn n sn 0 "Yes" "No" String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int n = 0, sn = 0;
    for(int i = 0; i < str.length(); i++) {
      int a = str.charAt(i) - '0';
      n = a + n * 10;
      sn += a;
    }
    System.out.println(((n % sn == 0) ? "Yes" : "No"));
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int n = 0, sn = 0;
    for(int i = 0; i < str.length(); i++) {
      int a = str.charAt(i) - '0';
      n = a + n * 10;
      sn += a;
    }
    System.out.println(((n % sn == 0) ? "Yes" : "No"));
  }
} Main
import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String str = sc.next();
    int n = 0, sn = 0;
    for(int i = 0; i < str.length(); i++) {
      int a = str.charAt(i) - '0';
      n = a + n * 10;
      sn += a;
    }
    System.out.println(((n % sn == 0) ? "Yes" : "No"));
  }
}