#include <bits/stdc++.h>
using namespace std;
int n, cnt;
int main() {
  cin >> n;
  int t = n;
  while (n) cnt += (n % 10), n /= 10;
  if (t % cnt == 0)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
