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