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