#include<bits/stdc++.h>
using namespace std;
int sum(int x){
    int s=0;
    while(x>0){
        s+=x%10;
        x/=10;
    }
    return s;
}
int main() {
    int n;
    cin>>n;
    cout<<(n%sum(n)==0 ? "Yes":"No")<<endl;
}