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