#include <bits/stdc++.h>
int main() {
  std::string s;
  std::cin >> s;
  int digit = stoi(s);
  int total = (std::accumulate(s.cbegin(), s.cend(), 0)) - s.size() * 48;
  std::cout << ((digit % total == 0) ? "Yes" : "No") << std::endl;
}
