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