#include <bits/stdc++.h>
using namespace std;

int main(){
    int N;
    cin >> N;
    string sn = to_string(N);
    int sum = 0;
    for(int i = 0; i < sn.length(); i++){
        sum += ctoi(sn[i]);
    }
    if(N % sum == 0) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}