#include <bits/stdc++.h>
using namespace std;
long long q, r;
long long l[5];
int main() {
  cin >> q;
  long long d = 0;
  r = q;
  for (long long i = 2; i * i <= q; i++) {
    while (r % i == 0) {
      r = r / i;
      l[d] = i;
      d++;
      if (d > 1) break;
    }
  }
  if (d == 0 || q == 1)
    cout << 1 << endl << 0;
  else if (d == 1 || (d == 2 && r == 1))
    cout << 2;
  else
    cout << 1 << endl << (l[0] * l[1]);
  return 0;
}
