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