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