#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll;
const int maxn=1e3+6;


int s(int n)
{
	int ans=0;
	while(n)
	{
		ans+=n%10;
		n/=10;
	}
	return ans;
}

int main()
{
	int n;
	while(~scanf("%d",&n))
	{
		if(n%s(n))	printf("No\n");
		else		printf("Yes\n");
	}
	return 0;
}