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