#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sum;
  scanf("%d", &n);
  int tmp = n;
  while (tmp > 0) {
    sum += tmp % 10;
    tmp /= 10;
  }
  if (n % sum == 0)
    puts("Yes");
  else
    puts("No");
}
