#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[10], m;
  cin >> n;
  a[0] = n % 10;
  a[1] = n / 10 % 10;
  a[2] = n / 100 % 10;
  a[3] = n / 1000 % 10;
  a[4] = n / 10000 % 10;
  a[5] = n / 100000 % 10;
  a[6] = n / 1000000 % 10;
  a[7] = n / 10000000 % 10;
  a[8] = n / 100000000 % 10;
  a[9] = n / 1000000000 % 10;
  for (long long i = 0; i < 10; i++) m += a[i];
  if (n % m == 0)
    printf("Yes");
  else
    printf("No");
}
