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