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