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