#include <bits/stdc++.h>
using namespace std;
char a[100001];
int c, d;
int main() {
  scanf("%s", a);
  int str = strlen(a);
  for (int i = 0; i < str; i++) {
    d = 10 * d + a[i] - '0';
    c += a[i] - '0';
  }
  if (d % c == 0)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
