#include <bits/stdc++.h>
int main() {
  long int a, S = 0;
  long int m = 10;
  std::cin >> a;
  while (a / m != 0) {
    S += a % 10;
    a /= 10;
  }
  S += a % 10;
  if (a % S == 0) {
    std::cout << "Yes";
  } else {
    std::cout << "No";
  }
  return 0;
}
