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