#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N, sum;
  cin >> N;
  while (N >= 10) {
    sum += N % 10;
    N /= 10;
  }
  cout << (N % sum == 0 ? "Yes" : "No") << endl;
  return 0;
}
