#include <bits/stdc++.h>
int main() {
  char;
  int N, x = 0, S, n = 10, i;
  scanf("%d", &N);
  i = N;
  while (1) {
    x += N % n;
    N -= N % n;
    if (N < 1) break;
  }
  if (i % x == 0)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
