#include <bits/stdc++.h>
using namespace std;
int main() {
  int s, n, a, b, c;
  cin >> n;
  if (n < 10)
    s = n;
  else if (n < 100) {
    a = n / 10;
    b = n - a * 10;
    s = a + b;
  } else if (n < 1000) {
    c = n / 100;
    a = (n - c * 100) / 10;
    b = n - a * 10 - c * 100;
    s = a + b + c;
  }
  if (n % s == 0)
    cout << "Yes";
  else
    cout << "No";
}
