#include <bits/stdc++.h>
using namespace std;
int add(int N) {
  int S = 0, a;
  for (int i = 1; i <= 10; i++) {
    a = N % 10;
    S += a;
    N /= 10;
  }
  return S;
}
int main() {
  int N;
  cin >> N;
  int S = 0;
  S = add(N);
  if (N % S == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
