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