#include <iostream>
#include <string>

using namespace std;

int main(){
    int n, sum;
    cin >> n;
    string str = to_string(n);
    int l = str.length();
    for(int i = 0; i < l; i++){
        sum += atoi(str[i].c_str());
    }
    if(n % sum == 0){
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}