#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int i;
  int n;
  int s_n = 0;
  int temp;
  char s[10];
  char now;
  cin >> s;
  n = atoi(s);
  for (i = 0; i < 10; i++) {
    now = s[i];
    if (now == '\0') {
      break;
    } else {
      s_n += atoi(&now);
    }
  }
  if (n % s_n == 0)
    cout << "Yes"
         << "\n";
  else
    cout << "No"
         << "\n";
  return 0;
}
