#include <bits/stdc++.h>
using namespace std;
const int N = int(1e7) + 10;
long long n;
double sqn;
bool vis[N];
vector<int> fac;
int main() {
  scanf("%I64d", &n);
  sqn = sqrt((double)n);
  for (int p = 2; p <= sqn; p++)
    if (!vis[p]) {
      for (int q = p; q <= sqn; q += p) vis[q] = true;
      while (n % p == 0) {
        fac.push_back(p);
        n /= p;
      }
    }
  if (n > 1) fac.push_back(n);
  if (fac.size() == 2)
    printf("2\n");
  else {
    if (fac.size() > 2)
      printf("1\n%I64d\n", (long long)fac[0] * fac[1]);
    else
      printf("1\n0\n");
  }
  return 0;
}
