#include <bits/stdc++.h>
using namespace std;
int main() {
  long long q;
  cin >> q;
  vector<long long> divs;
  for (long long i = 2; i * i <= q; ++i) {
    if (q % i == 0 && i * i < q && q % (i * i) == 0) {
      cout << "1\n" << i * i << "\n";
      return 0;
    }
    if (q % i == 0) divs.push_back(i);
  }
  if (divs.size() == 1) {
    cout << 2 << endl;
  } else {
    cout << "1\n";
    if (divs.size() == 0)
      cout << "0\n";
    else if (divs[1] % divs[0])
      cout << divs[1] * divs[0] << "\n";
    else
      cout << divs[1] << "\n";
  }
}
