// lcmとか__builtin_popcountとかはg++ -std=c++17 default.cppみたいなかんじで

#include <bits/stdc++.h>
#define mod 1000000007
#define INF LLONG_MAX
#define ll long long
#define ln cout<<endl
#define Yes cout<<"Yes"<<endl
#define NO cout<<"NO"<<endl
#define YES cout<<"YES"<<endl
#define No cout<<"No"<<endl
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
using namespace std;
ll dx[4]={1,0,-1,0};
ll dy[4]={0,1,0,-1};

int main() {
    cin.tie(0);
   	ios::sync_with_stdio(false);

    ll  a,b,c,d,e,n,k,maxi=0,f=0,mini=INF,sum=0,q;
	string str,stra,ko;
    ll x,y,w,z;
    char hoge,fuga;
    cin>>n;
    b=n;
    while(b>0){
        sum+=b%10;
        b/=10;
    }
    if(n%sum) No;
    else Yes;

    return 0;
}

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

int main() {
  int N=0, a=0, b=0, c=10;
  cin >> N;
  
  a = N % c;
  for(int i=0; i<8; i++){
    if(c > N){
      break;
    }
    b = N / c;
    a += b % 10 ;
    c = c * 10;
  }
  
  if(N % a == 0){
    cout << "Yes" << endl;
  }
  else{
   cout << "No" << endl;
  } 
}