#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, s1, s2, s3, ans;
  cin >> N;
  s1 = N / 100;
  s2 = (N % 100) / 10;
  s3 = N - s1 * 100 - s2 * 10;
  ans = s1 + s2 + s3;
  if (N % ans == 0)
    cout << "Yes";
  else
    cout << "No";
}
