#include <bits/stdc++.h>
using namespace std;
char a[10];
int main() {
  scanf("%s", a);
  int lsum = 0, sum = 0;
  for (int i = 0; i < strlen(a); i++) {
    lsum += a[i] - '0';
    sum = sum * 10 + a[i];
  }
  if (sum % lsum == 0)
    printf("Yes\n");
  else
    printf("No\n");
}
