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