#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i< (n); i++)
using ll = long long;
using P = pair<int, int>;
int main()
{   
    int n;
    cin >> n;
    string m = to_string(n);
    int cnt = 0;
    rep(i,m.size()){
        cnt += m.at(i) - '0';
    }
    if(n % cnt == 0)cout << "Yes" << endl;
    else cout << "No" << endl;
return 0;
}
#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;
      }
}