#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  int s = 0;
  int M = N;
    while(M != 0){
      s += M % 10;
      M = M / 10;
    }
	if ( N % s == 0)
      cout << "Yes" << endl;
  	if ( N % s != 0)
      cout << "No" <<endl;
}


#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;
  }
}
