#include <bits/stdc++.h>
using namespace std;
template <class C>
inline bool in_(const typename C::key_type& k, const C& A) {
  return A.find(k) != A.end();
}
inline bool in_(const string& s, const string& S) {
  return S.find(s) != string::npos;
}
int main() {
  std::ios::sync_with_stdio(false);
  int N;
  cin >> N;
  int sum = 0;
  int div = N;
  while (div > 0) {
    sum += div % 10;
    div = div / 10;
  }
  if (N % sum == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
