#include <bits/stdc++.h>
using namespace std;

int main () {
  string N;
  cin >> N;
  int cnt = 0;
  for (int i = 0; i < N.length(); ++i) {
    cnt += (int)N[i];
  }
  if ((long long)N % cnt == 0) cout << "Yes";
  else cout << "No";    
}
