#include <bits/stdc++.h>
int main(void) {
  int N;
  scanf("%d", &N);
  int i = 10;
  int j = 0;
  int str[9] = {};
  while (N > i - 1) {
    str[j] = N % i;
    i = i * 10;
    j++;
  }
  str[j] = 1;
  int total = 0;
  for (int k = 0; k < 9; k++) {
    total = total + str[k];
  }
  if (N % total == 0) {
    printf("Yes");
  } else {
    printf("No");
  }
  return 0;
}
