#include <bits/stdc++.h>

using namespace std;

int main() {

	int n;
	cin >> n ;

	int a;
	a = n;

	int m=0;
	
	while (n != 0) {
		m += n % 10;
		n /= 10;
	}

	cout << (a%m==0? "Yes" : "No") << endl;

}