#include <bits/stdc++.h>
int main(void) {
  int n, m;
  int s = 0, i;
  scanf("%d\n", &n);
  m = n;
  i = 0;
  do {
    s += m % 10;
    m = m / 10;
    i++;
  } while (i < 10);
  if (n % s == 0)
    printf("Yes");
  else
    printf("No");
  return 0;
}
