#include <bits/stdc++.h>
#pragma Grem optimize("O3")
using namespace std;
const long long Long_max = numeric_limits<long long>::max();
const int Int_max = numeric_limits<int>::max();
int dx[] = {1, -1, 0, 0, 1, -1, -1, 1};
int dy[] = {0, 0, -1, 1, 1, -1, 1, -1};
void File_input(string pathIn) { freopen(pathIn.c_str(), "r", stdin); }
void File_output(string pathOut) { freopen(pathOut.c_str(), "w", stdout); }
int msg() {
  srand(time(0));
  vector<string> st = {"Wish everyone high ratings!", "Good luck!", "Have fun!",
                       "Please, read all the problems!", "Go Go fight!"};
  cerr << st[rand() % (int)st.size()];
  return 0;
}
void FastInputOutput() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int n;
int sum = 0;
int tmp;
int main() {
  cin >> n;
  tmp = n;
  while (tmp) {
    sum += tmp % 10;
    tmp /= 10;
  }
  cout << (n % sum ? "No" : "Yes");
  return 0;
}
