#include <bits/stdc++.h>
int main() {
  int cnt = 0, n = 0, s = 0;
  char N[20];
  for (int i = 0; i < 20; i++) {
    scanf("%c", &N[i]);
    if (N[i] == '\n') {
      break;
    }
    cnt++;
  }
  for (int i = 0; i < cnt; i++) {
    int x = (int)(N[i] - '0');
    n += x * pow(10, cnt - i - 1);
    s += x;
  }
  if (n % s == 0) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}
