#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  long long n;
  cin >> n;
  long long q = -1, p = -1;
  for (long long i = 2; i * i <= n && q == -1; i++)
    if (!(n % i)) q = i;
  if (q != -1) n /= q;
  for (long long i = 2; i * i <= n && p == -1; i++)
    if (!(n % i)) p = i;
  if (p != -1) n /= p;
  if (q == -1 && p == -1)
    cout << 1 << endl << 0;
  else if (q == -1 || p == -1)
    cout << 2;
  else
    cout << 1 << endl << q * p << endl;
  return 0;
}
