#include <bits/stdc++.h>
long long p;
int n;
long long node[10002];
int winner[10002];
int comp(const void *ka, const void *kb) {
  long long a = *(long long *)ka;
  long long b = *(long long *)kb;
  if (a < b) return -1;
  if (a > b) return 1;
  return 0;
}
int main() {
  scanf("%I64d", &p);
  long long nowv = 1;
  while (1) {
    if (p % nowv == 0) {
      node[n++] = nowv;
      if (p > nowv * nowv) node[n++] = p / nowv;
    }
    nowv++;
    if (p < nowv * nowv) break;
  }
  qsort(node, n, sizeof(long long), comp);
  for (int i = 0; i < n; i++) {
    int flg = -1;
    for (int j = 1; j < i; j++)
      if (node[i] % node[j] == 0) {
        if (winner[j] == 2) {
          flg = 1;
        } else {
          if (flg < 0) flg = 0;
        }
      }
    if (flg) {
      winner[i] = 1;
    } else {
      winner[i] = 2;
    }
  }
  printf("%d\n", winner[n - 1]);
  if (2 - winner[n - 1]) {
    int flg = 1;
    for (int j = 0; j < n - 1; j++)
      if (winner[j] == 2)
        if (p % node[j] == 0) {
          printf("%I64d\n", node[j]);
          flg = 0;
          break;
        }
    if (flg) printf("0\n");
  }
  return 0;
}
