#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
    int a,b,c,d,h,i,k,j;float m;
    char s[10];
    getchar();
    gets(s);h=0;k=0;m=0.1;
    b=strlen(s);int f[b];
    for(i=0;i<b;i++)
    {

        f[i]=s[i]-48;
     }for(i=b-1;i>=0;i--)
    {m=m*10;
        h=h+f[i]*m;k=k+f[i];
}if(h%k!=0)printf("YES\n");
else printf("NO\n");
}
