#include <bits/stdc++.h>
int main(void) {
  int n;
  int s, ten = 1;
  scanf("%d", &n);
  for (int i = 0; i < 9; i++) {
    ten = ten * 10;
    if (n % s != n) {
      s = s + n % s;
      n = n - s;
    }
  }
  if (n % s == 0)
    printf("Yes\n");
  else
    printf("No\n");
  return 0;
}
