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