#include <bits/stdc++.h>
int main() {
  long long n0;
  long long sn = 0;
  std::cin >> n0;
  long long n = n0;
  while (n > 10) {
    sn = sn + n % 10;
    n /= 10;
  }
  sn = sn + n % 10;
  if (n0 % sn == 0) {
    std::cout << "Yes";
  } else {
    std::cout << "No";
  }
}
