#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1e9;
const long long MOD = (long long)1e9 + 7;
const double EPS = (double)1e-10;
struct Accelerate_Cin {
  Accelerate_Cin() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(20);
  };
};
signed main() {
  long long N;
  cin >> N;
  long long temp = N;
  long long sum = 0;
  while (N > 0) {
    sum += N % 10;
    N /= 10;
  }
  if (temp % sum == 0) {
    cout << "Yes"
         << "\n";
  } else {
    cout << "No"
         << "\n";
  }
  return 0;
}
