#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int A = N;
  int count = 0;
  for (int i = 0; i < 10; i++) {
    if (N / 10 == 0) {
      break;
    }
    count = count + N % 10;
    N = N / 10;
  }
  if (A % count == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
