#include <bits/stdc++.h>
int main(void) {
  int M;
  int N;
  scanf("%d", &N);
  M = N;
  int dig;
  int Sn = 0;
  while (M) {
    dig = M % 10;
    Sn = Sn + dig;
    M = M / 10;
  }
  if (N % Sn == 0) {
    printf("yes\n");
  } else {
    printf("no\n");
  }
}
