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