#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, ans = 0;
  cin >> N;
  for (;;) {
    ans = ans + (N % 10);
    int s = N - (N % 10);
    N = s / 10;
    if (N == 0) break;
  }
  if ((N % ans) == 0) cout << "Yes" << endl;
  if ((N % ans) != 0) cout << "No" << endl;
}
