#include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#include<limits.h>
#include<math.h>
#include<map>
#include<vector>
#define pi acos(-1.0)
#define ll long long
#define INF 0x3f3f3f3f
const int maxn=1e6+10;
int main()
{
	int n;
	int sum=0;
	scanf("%d",&n);
	int x=n;
	while(x)
	{
		sum=sum+x%10;
		x/=10;
	}
	if(n%sum)
	printf("No\n");
	else
	printf("Yes\n");
	return 0;
}