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