#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int Max = 4e6;
long long m;
int p[Max + 1];
bool vis[Max + 1];
int s;
long long ans;
void prime() {
  memset(vis, 0, sizeof vis);
  p[0] = 0;
  for (int i = 2; i <= Max; i++) {
    if (!vis[i]) p[++p[0]] = i;
    for (int j = 1; j <= p[0] && (long long)p[j] * i <= Max; j++) {
      vis[p[j] * i] = 1;
      if (!(i % p[j])) break;
    }
  }
}
long long divid(long long x) {
  long long y = x;
  long long u = 1;
  for (int i = 1; i <= p[0] && (long long)p[i] * p[i] <= x; i++) {
    if (s > 2) break;
    while (!(x % p[i])) {
      s++;
      if (s < 3) u *= p[i];
      x /= p[i];
    }
  }
  if (x > 1) {
    s++;
    if (s < 3) u *= s;
  }
  if (x == y) return 0;
  if (s < 3) return -1;
  return u;
}
int main() {
  prime();
  while (cin >> m) {
    s = 0;
    ans = divid(m);
    if (ans == -1)
      puts("2");
    else
      printf("1\n%d\n", ans);
  }
  return 0;
}
