#include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
  int n;
  int n1;
  int sum = 0;
  int i;
  if (scanf("%d", &n) == 1)
    ;
  n1 = n;
  for (i = 0; i < 9; i++) {
    sum += n1 % 10;
    n1 = n1 / 10;
  }
  if (n % sum == 0) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}
