#include <bits/stdc++.h>
using namespace std;
int GCD(const int& a, const int& b) {
  const int& _a = max(a, b);
  const int& _b = min(a, b);
  if (_a % _b == 0) {
    return _b;
  } else {
    return GCD(_b, _a % _b);
  }
}
int LCM(const int& a, const int& b) {
  const int& _a = max(a, b);
  const int& _b = min(a, b);
  return (_a * _b) / (GCD(_a, _b));
}
int main() {
  string n;
  cin >> n;
  int int_n = stoi(n);
  int sum = 0;
  for (int i = 0; i < n.size(); i++) {
    char tmp = n[i];
    sum += atoi(&tmp);
  }
  if (int_n % sum == 0) {
    cout << "Yes" << endl;
    return 0;
  } else {
    cout << "No" << endl;
    return 0;
  }
}
