#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, l = 0;
  cin >> n;
  m = n;
  while (m) {
    l += m % 10;
    m /= 10;
  }
  if (n % l)
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
}
