#include<stdio.h>
#include<math.h>
int main()
{
    int m,a[100];
    scanf("%d",&m);
    int x=m,i=0;
    while(x!=0)
    {
        int c,d,f;
        c=x/10;
        a[i]=x-c*10;
        x/=10;
        i++;
    }
    int j,s=0;
    for(j=0;j<i;j++) s+=a[j];
    if(m%s==0) printf("Yes\n");
    else printf("No\n");
}

