#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
	long long int n;
	int i,sum,t;
	while(scanf("%d",&n)!=EOF)
	{
		sum=0;
		while(t)
		{
			t=n%10;
			n=n/10;
			sum+=t;
		}
		if(n%sum==0) printf("Yes\n");
		else   printf("No\n");
	}
	return 0;
}