#include <bits/stdc++.h>
int main() {
  int a, d[9], i, sum = 0, hoge;
  scanf("%d", &a);
  hoge = a;
  for (i = 0; i <= 9; i++) {
    d[i] = a / pow(10, 9 - i);
    a = a % (int)pow(10, 9 - i);
    sum = sum + d[i];
  }
  if (hoge % sum == 0) {
    printf("Yes");
  } else {
    printf("No");
  }
  return 0;
}
