import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s = String.valueOf(n);
    int aa = s.length();
    int[] a = new int[aa];
    int ss = 0;
    for(int i = 0;i<aa;i++){
      a[i] = Integer.parseInt(s.substring(i,i+1));
      ss += a[i];
    }
    if(n % ss == 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);
    int n = sc.nextInt();
    String s = String.valueOf(n);
    int aa = s.length();
    int[] a = new int[aa];
    int ss = 0;
    for(int i = 0;i<aa;i++){
      a[i] = Integer.parseInt(s.substring(i,i+1));
      ss += a[i];
    }
    if(n % ss == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s = String.valueOf(n);
    int aa = s.length();
    int[] a = new int[aa];
    int ss = 0;
    for(int i = 0;i<aa;i++){
      a[i] = Integer.parseInt(s.substring(i,i+1));
      ss += a[i];
    }
    if(n % ss == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s = String.valueOf(n);
    int aa = s.length();
    int[] a = new int[aa];
    int ss = 0;
    for(int i = 0;i<aa;i++){
      a[i] = Integer.parseInt(s.substring(i,i+1));
      ss += a[i];
    }
    if(n % ss == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String s = String.valueOf(n); s String.valueOf(n) String.valueOf String n int aa = s.length(); aa s.length() s.length s int[] a = new int[aa]; a new int[aa] aa int ss = 0; ss 0 for(int i = 0;i<aa;i++){
      a[i] = Integer.parseInt(s.substring(i,i+1));
      ss += a[i];
    } int i = 0; int i = 0; i 0 i<aa i aa i++ i++ i {
      a[i] = Integer.parseInt(s.substring(i,i+1));
      ss += a[i];
    } {
      a[i] = Integer.parseInt(s.substring(i,i+1));
      ss += a[i];
    } a[i] = Integer.parseInt(s.substring(i,i+1)) a[i] a i Integer.parseInt(s.substring(i,i+1)) Integer.parseInt Integer s.substring(i,i+1) s.substring s i i+1 i 1 ss += a[i] ss a[i] a i if(n % ss == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    } n % ss == 0 n % ss n ss 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);
    int n = sc.nextInt();
    String s = String.valueOf(n);
    int aa = s.length();
    int[] a = new int[aa];
    int ss = 0;
    for(int i = 0;i<aa;i++){
      a[i] = Integer.parseInt(s.substring(i,i+1));
      ss += a[i];
    }
    if(n % ss == 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);
    int n = sc.nextInt();
    String s = String.valueOf(n);
    int aa = s.length();
    int[] a = new int[aa];
    int ss = 0;
    for(int i = 0;i<aa;i++){
      a[i] = Integer.parseInt(s.substring(i,i+1));
      ss += a[i];
    }
    if(n % ss == 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);
    int n = sc.nextInt();
    String s = String.valueOf(n);
    int aa = s.length();
    int[] a = new int[aa];
    int ss = 0;
    for(int i = 0;i<aa;i++){
      a[i] = Integer.parseInt(s.substring(i,i+1));
      ss += a[i];
    }
    if(n % ss == 0){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}
