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