#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
int main() {
  string S;
  cin >> S;
  int N = S.size();
  int sum = 0;
  vector<int> vec(N);
  rep(i, N) {
    if(S.at(i) == '0') {
      vec.at(i) = 0;
    }
    if(S.at(i) == '1') {
      vec.at(i) = 1;
    }
    if(S.at(i) == '2') {
      vec.at(i) = 2;
    }
    if(S.at(i) == '3') {
      vec.at(i) = 3;
    }
    if(S.at(i) == '4') {
      vec.at(i) = 4;
    }
    if(S.at(i) == '5') {
      vec.at(i) = 5;
    }
    if(S.at(i) == '6') {
      vec.at(i) = 6;
    }
    if(S.at(i) == '7') {
      vec.at(i) = 7;
    }
    if(S.at(i) == '8') {
      vec.at(i) = 8;
    }
    if(S.at(i) == '9') {
      vec.at(i) = 9;
    }
  }
  reverse(vec.begin(), vec.end());
  vector<int> vec10(N);
  rep(i, N) {
    if(i == 0) {
      vec10.at(i) = 1;
    }
    else {
      vec10.at(i) = vec10.at(i-1)*10;
    }
  }
  int sum2 = 0;
  rep(i, N) {
    sum += vec.at(i) * vec10.at(i);
    sum2 += vec.at(i);
  }
  if(sum%sum2 == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for(int i = n-1; i >= 0; i--)
#define  all(x) (x).begin(),(x).end()     // 昇順ソート
#define  rall(v) (v).rbegin(), (v).rend() // 降順ソート
#define  FastIO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
typedef long long ll;
using P = pair<int,int>;
using VI = vector<int>;
using VVI = vector<vector<int>>;
using VL = vector<ll>;
using VVL = vector<vector<ll>>;
using VP = vector<P>;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return true; } return false; }

int main(){
    int n;
    cin >> n;
    int sum = 0;
    int x = n;
    while(n){
        sum += n % 10;
        n /= 10;
    }
    if (x % sum == 0) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}