#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,re,b,sum;
    cin>>n;
    re=n;
    sum=0;
    while(re>0)
    {
        sum+=re%10;
        re/=10;
    }
    if(n%sum==0) printf("Yes\n");
    else printf("N0\n");
    return  0;
}
