#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long n = 0, u;
  cin >> n;
  int sum = 0;
  u = n;
  for (int i = 0; i < 10; i++) {
    sum += u % 10;
    u /= 10;
  }
  if (n % sum == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
