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