#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int M = N;
  int i = 0;
  int sum = 0;
  
  while (M >= 1) {
    sum += (M - (M / 10) * 10);
    M = M / 10;
  }
  
  if (N % sum == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}
#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<list>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define pqueue priority_queue
const int inf=1e9+7;
const ll mod=1e9+7;
const ll mod1=998244353;
const ll big=1e18;
const double PI=2*asin(1);

int main() {
  ll N;
  cin>>N;
  string tmp = to_string(N);
  int X = 0;
  for(int i=0;i<tmp.size();++i) {
    X += tmp[i]-'0';
  }
  if(N%X==0) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

