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