#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, Sn[10], s = 0;
  while (1) {
    std::cin >> N;
    if (N >= 1 && N <= 1000000000) break;
  }
  int N_x = N;
  int x = 1, i = 0;
  while (N_x / 10 > 0) {
    N_x = N_x / 10;
    x++;
  }
  while (i < x) {
    if (i == 0)
      Sn[i] = N % 10;
    else if (i != 0 && i < x - 1) {
      int n = 0, N_y = N;
      while (n < i) {
        N_y = N_y / pow(10, i);
        n++;
      }
      Sn[i] = N_y % 10;
    } else
      Sn[i] = N / pow(10, i);
    std::cout << Sn[i] << '\n';
    s = s + Sn[i];
    i++;
  }
  if (N % s == 0)
    std::cout << "Yes" << '\n';
  else
    std::cout << "No" << '\n';
}
