#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	int n;
	while(cin>>n)
	{
		int s=0,m=0;
		m=n;
		while(m)
		{
			s+=m%10;
			m/=10;	
		}
		if(n%s==0)
		cout<<"Yes"<<endl;
		else cout<<"No"<<endl;
	}
	return 0;
}