import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    System.out.println(n % digitSum(n) == 0 ? "Yes" : "No");
  }
  
  public static int digitSum(long n){
    int ans = 0;
    while(n != 0){
      ans += n % 10;
      n /= 10;
    }
    
    return ans;
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    System.out.println(n % digitSum(n) == 0 ? "Yes" : "No");
  }
  
  public static int digitSum(long n){
    int ans = 0;
    while(n != 0){
      ans += n % 10;
      n /= 10;
    }
    
    return ans;
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    System.out.println(n % digitSum(n) == 0 ? "Yes" : "No");
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    System.out.println(n % digitSum(n) == 0 ? "Yes" : "No");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc System.out.println(n % digitSum(n) == 0 ? "Yes" : "No") System.out.println System.out System System.out n % digitSum(n) == 0 ? "Yes" : "No" n % digitSum(n) == 0 n % digitSum(n) n digitSum(n) digitSum n 0 "Yes" "No" String[] args args public static int digitSum(long n){
    int ans = 0;
    while(n != 0){
      ans += n % 10;
      n /= 10;
    }
    
    return ans;
  } digitSum {
    int ans = 0;
    while(n != 0){
      ans += n % 10;
      n /= 10;
    }
    
    return ans;
  } int ans = 0; ans 0 while(n != 0){
      ans += n % 10;
      n /= 10;
    } n != 0 n 0 {
      ans += n % 10;
      n /= 10;
    } ans += n % 10 ans n % 10 n 10 n /= 10 n 10 return ans; ans long n n public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    System.out.println(n % digitSum(n) == 0 ? "Yes" : "No");
  }
  
  public static int digitSum(long n){
    int ans = 0;
    while(n != 0){
      ans += n % 10;
      n /= 10;
    }
    
    return ans;
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    System.out.println(n % digitSum(n) == 0 ? "Yes" : "No");
  }
  
  public static int digitSum(long n){
    int ans = 0;
    while(n != 0){
      ans += n % 10;
      n /= 10;
    }
    
    return ans;
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    System.out.println(n % digitSum(n) == 0 ? "Yes" : "No");
  }
  
  public static int digitSum(long n){
    int ans = 0;
    while(n != 0){
      ans += n % 10;
      n /= 10;
    }
    
    return ans;
  }
}