#include<stdio.h>
int main()
{
	long long x,y;
	scanf("%lld",&y);
	x=y;
	int sum=0;
	while(x>0)
	{
		sum=sum+x%10;
		x=x/10; 
	}
	if(y%sum==0)
		printf("Yes\n");
	else
		printf("No\n");
	
	
	return 0;
}