import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n= sc.nextInt();
    int sum = 0;
    String str[] = String.valueOf(n).split("");
    for (int i=0 ; i < str.length ; i++){
        sum += Integer.parseInt(str[i]);
    }
        System.out.println(n%sum==0?"Yes":"No");
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n= sc.nextInt();
    int sum = 0;
    String str[] = String.valueOf(n).split("");
    for (int i=0 ; i < str.length ; i++){
        sum += Integer.parseInt(str[i]);
    }
        System.out.println(n%sum==0?"Yes":"No");
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n= sc.nextInt();
    int sum = 0;
    String str[] = String.valueOf(n).split("");
    for (int i=0 ; i < str.length ; i++){
        sum += Integer.parseInt(str[i]);
    }
        System.out.println(n%sum==0?"Yes":"No");
  } main {
    Scanner sc = new Scanner(System.in);
    int n= sc.nextInt();
    int sum = 0;
    String str[] = String.valueOf(n).split("");
    for (int i=0 ; i < str.length ; i++){
        sum += Integer.parseInt(str[i]);
    }
        System.out.println(n%sum==0?"Yes":"No");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n= sc.nextInt(); n sc.nextInt() sc.nextInt sc int sum = 0; sum 0 String str[] = String.valueOf(n).split(""); str String.valueOf(n).split("") String.valueOf(n).split String.valueOf(n) String.valueOf String n "" for (int i=0 ; i < str.length ; i++){
        sum += Integer.parseInt(str[i]);
    } int i=0 ; int i=0 ; i 0 i < str.length i str.length str str.length i++ i++ i {
        sum += Integer.parseInt(str[i]);
    } {
        sum += Integer.parseInt(str[i]);
    } sum += Integer.parseInt(str[i]) sum Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str i System.out.println(n%sum==0?"Yes":"No") System.out.println System.out System System.out n%sum==0?"Yes":"No" n%sum==0 n%sum n sum 0 "Yes" "No" String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n= sc.nextInt();
    int sum = 0;
    String str[] = String.valueOf(n).split("");
    for (int i=0 ; i < str.length ; i++){
        sum += Integer.parseInt(str[i]);
    }
        System.out.println(n%sum==0?"Yes":"No");
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n= sc.nextInt();
    int sum = 0;
    String str[] = String.valueOf(n).split("");
    for (int i=0 ; i < str.length ; i++){
        sum += Integer.parseInt(str[i]);
    }
        System.out.println(n%sum==0?"Yes":"No");
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n= sc.nextInt();
    int sum = 0;
    String str[] = String.valueOf(n).split("");
    for (int i=0 ; i < str.length ; i++){
        sum += Integer.parseInt(str[i]);
    }
        System.out.println(n%sum==0?"Yes":"No");
  }
}