#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
const double EPS = 1e-10;
const double PI = acos(-1.0);
int main(void) {
  int n;
  int _n;
  cin >> n;
  int N = n;
  while (n != 0) {
    _n += n / 10;
    n /= 10;
  }
  cerr << "n"
       << " = " << (n) << " (L" << 64 << ")"
       << " "
       << "<stdin>" << endl;
  ;
  cerr << "_n"
       << " = " << (_n) << " (L" << 65 << ")"
       << " "
       << "<stdin>" << endl;
  ;
  cout << (N % _n == 0 ? "Yes" : "No") << endl;
  return 0;
}
