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