#include<algorithm>
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
	int n,i,j,a[10],sum,m;
	while(cin>>n)
	{
		m=n;
		memset(a,0,sizeof(a));
		sum=0;
		for(i=0;n!=0;i++)
		{
			a[i]=n%10;
			n=(n-a[i])/10;
		}
		for(j=0;j<=i;j++)
		{
			sum=sum+a[j];
		}
		if(m%sum==0)
		{
			cout<<"Yes"<<endl;
		}
		else
		cout<<"No"<<endl;	
	}	
}