#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	ll n;
	cin>>n;
	ll sum=0LL;
	ll k=n;
	while(k>0)
	{
		sum+=k%10;
		k=k/10;
	}
	if(n%sum==0)cout<<"Yes";
	else cout<<"No";
}