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