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