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