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