#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <climits>
#include <iomanip>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
int main(){
  ll n;
  cin >> n;
  string s = to_string(n);
  ll wa = 0;
  for(int i = 0;i < (int)s.size();i++){
    wa += s[i] - '0';
  }
  if(n % wa == 0)cout << "Yes" << endl;
  else cout << "No" << endl;
}
#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  int S = 0;
  int a = 1;
  
  
  for (int i =0; i < 9; i++) {
    int x;
    a *= 10;
    x = (N % a - N % (a/10)) / (a/10);
    S += x;
  }
  
  if (N % S == 0){
  	cout << "Yes";
  } 
  else {
  	cout << "No";
  }
 
}