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