#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  string M;
  long sum = 0;
  cin >> N;
  for (int i = (0), iformax = (to_string(N).length()); i < iformax; i++) {
    sum += N / (int)(pow(10, i)) % 10;
  }
  if (sum % N) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
  }
}
