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