#include <bits/stdc++.h>
using namespace std;
int num(int N){
int a = 0 , b = 1, c;
for(int i = 0 ; i < 9 ; i++){
a += N / b % 10;
b *= 10;
}
c = N % a;
return c;
}
int main(){
  int N;
  cin >> N;
      if(num(N) == 0){
        cout << "Yes" <<endl;
      }
      else if(num(N) != 0){
        cout << "No" << endl;
      }
}
#include <bits/stdc++.h>
using namespace std;

int main() { 
  string s;
  cin >> s;
  int c = s.size();
  int p = 0;
  int q = 0;

  for (int i = 0; i < c; i++){
    p *= 10;
    p += s.at(i) - '0';

    q += s.at(i) - '0';
  } 
  if(p%q==0){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}
