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