import java.util.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int s = calcS(n);
    if ( n % s == 0 ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
  
  private static int calcS(int n) {
    int val = 0;
    while (n > 0 ) {
      val += n % 10;
      n /= 10;
    }
    return val;
  }
} 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 s = calcS(n);
    if ( n % s == 0 ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
  
  private static int calcS(int n) {
    int val = 0;
    while (n > 0 ) {
      val += n % 10;
      n /= 10;
    }
    return val;
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int s = calcS(n);
    if ( n % s == 0 ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int s = calcS(n);
    if ( n % s == 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 int s = calcS(n); s calcS(n) calcS n if ( n % s == 0 ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    } n % s == 0 n % s n s 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 private static int calcS(int n) {
    int val = 0;
    while (n > 0 ) {
      val += n % 10;
      n /= 10;
    }
    return val;
  } calcS {
    int val = 0;
    while (n > 0 ) {
      val += n % 10;
      n /= 10;
    }
    return val;
  } int val = 0; val 0 while (n > 0 ) {
      val += n % 10;
      n /= 10;
    } n > 0 n 0 {
      val += n % 10;
      n /= 10;
    } val += n % 10 val n % 10 n 10 n /= 10 n 10 return val; val int n n public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int s = calcS(n);
    if ( n % s == 0 ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
  
  private static int calcS(int n) {
    int val = 0;
    while (n > 0 ) {
      val += n % 10;
      n /= 10;
    }
    return val;
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int s = calcS(n);
    if ( n % s == 0 ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
  
  private static int calcS(int n) {
    int val = 0;
    while (n > 0 ) {
      val += n % 10;
      n /= 10;
    }
    return val;
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int s = calcS(n);
    if ( n % s == 0 ) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }
  }
  
  private static int calcS(int n) {
    int val = 0;
    while (n > 0 ) {
      val += n % 10;
      n /= 10;
    }
    return val;
  }
}