#include <bits/stdc++.h>
using namespace std;
int main() {
  char str[20];
  while (scanf("%s", str) == 1) {
    int res = 0;
    int num = 0;
    for (int i = 0; str[i] != '\0'; i++) {
      num *= 10;
      num += str[i] - '0';
      res += str[i] - '0';
    }
    if (num % res == 0)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
