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