#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N;
  cin >> N;
  string s = to_string(N);
  int cnt = 0;
  for (int i = 0; i < s.length(); ++i) {
    cnt += s[i] - '0';
  }
  if (N % cnt == 0)
    cout << "Yes";
  else
    cout << "No";
}
