#include <bits/stdc++.h>
#include <string.h>
#define rep(i, n) for(int i = 0; i<(n); i++)
using namespace std;
typedef long long ll;

//minagara
int main() {

    string s;
    cin >> s;
    int sum = 0;
    for(char c : s){
        sum += c - '0';
        if(stoi(s) % sum == 0){
            cout << "Yes" << endl;
            return 0;
        }else{
            cout << "No" << endl;
            return 0;
        }
    }

}