#include <bits/stdc++.h>
using namespace std;
const int INF{1001001001};
const int MOD{(int)1e9 + 7};
const double EPS{1e-9};
const double PI{acos(-1)};
const int dx[]{0, 1, 0, -1, 1, -1, 1, -1}, dy[]{1, 0, -1, 0, 1, -1, -1, 1};
int main() {
  int N, sn, ans;
  cin >> N;
  int n = N;
  while (n != 0) {
    sn += n % 10;
    n /= 10;
  }
  if (N % sn == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
