#include <iostream>
 
int main()
{
	int N;
	int sum = 0;
cin >> N;
       int tmp = N;
while(tmp>0){
sum=sum+tmp%10;
tmp=tmp/10;
}
if( N%sum==0){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}



	return 0;
}