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