#include <bits/stdc++.h>
long long p, a, b;
int sus[1000000], gs;
bool vis[10000000];
int main() {
  memset(vis, 0, sizeof(vis));
  gs = 0;
  for (int i = 2; i < 10000000; i++)
    if (!vis[i]) {
      sus[gs++] = i;
      for (int j = i; j < 10000000; j += i) vis[j] = true;
    }
  a = -1;
  scanf("%I64d", &p);
  for (int i = 0; i < gs; i++)
    if (p % sus[i] == 0) {
      a = sus[i];
      p /= a;
      break;
    }
  if (a == -1 || p == 1) {
    printf("1\n0\n");
    return 0;
  }
  b = -1;
  for (int i = 0; i < gs; i++)
    if (p % sus[i] == 0) {
      b = sus[i];
      p /= sus[i];
      break;
    }
  if (b == -1 || p == 1)
    printf("2\n");
  else
    printf("1\n%I64d\n", a * b);
  return 0;
}
