#include <bits/stdc++.h>
using namespace std;
int main() {
  long long s, s_, sum = 0, i = 0;
  cin >> s;
  s_ = s;
  while (s_ >= 1) {
    sum = sum + (s_ % 10) * pow(10, i);
    s_ = (s_ - sum) / pow(10, i + 1);
    i = i + 1;
  }
  if (s % sum == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
