#include <bits/stdc++.h>
using namespace std;
int main() {
  string in(9, '0');
  int n = 0, s = 0, dummy = 0;
  cin >> in;
  for (int i = 0; i < in.size(); ++i) {
    dummy = (int)(in[i] - '0');
    s += dummy;
    n += dummy * pow(10, in.size() - i);
  }
  if ((n % s) == 0) {
    cout << "yes" << endl;
  } else {
    cout << "no" << endl;
  }
  return 0;
}
