#include <bits/stdc++.h>
int main() {
  int i, N, ans = 0, nn;
  scanf("%d", &N);
  nn = N;
  for (i = 0; i < 9; i++) {
    ans += nn % 10;
    nn /= 10;
  }
  if (N % ans == 0) {
    printf("Yes");
  } else {
    printf("No");
  }
  return 0;
}
