#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int total = 0;
  int a[n];
  string s;
  cin >> n;
  s = to_string(n);
  for (int i = 0; i < s.size(); i++) {
    a[i] = stoi(s.substr(i, 1));
    total = total + a[i];
  }
  if (n % total == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
