#include<stdio.h>
int num(int a)
{
	int sum;
	if(a>0)
	{	
		sum=a%10;
		sum+=num(a/10);
	}
	else
		return 0;
	return sum;
}
int main()
{
	int n,t;
	scanf("%d",&n);
	t=num(n);
	if(n%t==0)
		printf("Yes\n");
	else
		printf("No\n");
	return 0;
}