#include <bits/stdc++.h>
using namespace std;
long long S(long long N) {
  string s = to_string(N);
  long long r = 0;
  for (char x : s) {
    r += x - '0';
  }
  return r;
}
signed main() {
  long long N;
  cin >> N;
  cout << (N % S(N) == 0 ? "Yes" : "No") << endl;
}
