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