#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 main() {
  int N;
  cin >> N;
  
  int a = (N % 10);
  int b = (N-a)/10%10;
  int c = (N-10*b-a)/(10*10)%10;
  int d = (N-10*10*c-10*b-a)/(10*10*10)%10;
  int e = (N-10*10*10*d-10*10*c-10*b-a)/(10*10*10*10)%10;
  int f = (N-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/(10*10*10*10*10)%10;
  int g = (N-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/(10*10*10*10*10*10)%10;
  int h = (N-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/(10*10*10*10*10*10*10)%10;
  int i = (N-10*10*10*10*10*10*10*h-10*10*10*10*10*10*g-10*10*10*10*10*f-10*10*10*10*e-10*10*10*d-10*10*c-10*b-a)/(10*10*10*10*10*10*10*10)%10;
  
  if (N % (a+b+c+d+e+f+g+h+i) == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}
