#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
int main() {
  int n;
  cin >> n;
  string s = to_string(n);
  int l = s.size();
  int sn = 0;
  for (int i = 0; i < (l); ++i) {
    sn += s[i] - '0';
  }
  if (n % sn == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
