#include <bits/stdc++.h>
int main() {
  long n;
  scanf("%ld", &n);
  long cpy = n;
  int sum = 0, i;
  for (i = 0; i < 10; i++) {
    sum += cpy % 10;
    cpy = cpy / 10;
  }
  if (n % sum == 0)
    printf("Yes");
  else
    printf("No");
}
