#include <bits/stdc++.h>
unsigned long long int num, num2;
int l, i, j, arr[2];
int main() {
  scanf("%I64d", &num);
  num2 = num;
  l = ceil(sqrt(num));
  for (i = 2; i <= l; i++) {
    while ((!(num % i)) && (j < 2)) {
      arr[j++] = i;
      num /= i;
    }
    if (j == 2) {
      break;
    }
  }
  if ((j == 2) && (num == 1)) {
    j = 1;
  }
  if (num2 == 2) {
    j = 0;
  }
  switch (j) {
    case 0:
      puts("1\n0");
      break;
    case 2:
      printf("1\n%I64d\n",
             (unsigned long long int)arr[0] * (unsigned long long int)arr[1]);
      break;
    case 1:
      puts("2");
      break;
  }
  return 0;
}
