#include <bits/stdc++.h>
using namespace std;
int S(int N) {
  string s = to_string(N);
  int sum = 0;
  for (char x : s) {
    sum += x - '0';
  }
  return sum;
}
int main() {
  int N;
  cin >> N;
  cout << (N % S(N) == 0 ? "Yes" : "No") << endl;
  return 0;
}
