#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
ll a;
int main()
{
	cin>>a;
	ll ans=0;
	ll n=a;
	while(n)
	{
		ans+=n%10;
		n/=10;
	}
	if(a%ans==0) cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	return 0;
}