#include <bits/stdc++.h>
using namespace std;
int sum(int n) {
  string s = to_string(n);
  int res = 0;
  for (int i = 0; i < s.length(); ++i) {
    res += (s[i] - '0');
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  if (n % sum(n) == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
