#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N,dig,sum,i;
sum=0;
cin>>N;
i=N;
while(i){
dig=i%10;
sum+=dig;
i/=10;
}
if((N%sum)==0){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
