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