#include <bits/stdc++.h>
int main() {
  int N, Sn, x;
  printf("整数N:");
  if (scanf("%d", &N) == 1)
    ;
  if (N < 1 || N > pow(10, 9.0)) {
    printf("Error: 1 ≦ N ≦ 10^9\n");
    return 1;
  }
  int y = N;
  while (N > 0) {
    x = N % 10;
    Sn += x;
    N /= 10;
  }
  printf("%d\n", Sn);
  if (y % Sn == 0) {
    printf("yes\n");
  } else {
    printf("No\n");
  }
  return 1;
}
