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