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