#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long int q;
  cin >> q;
  vector<long long int> del;
  long long int d = 2;
  long long int temp = q;
  while (temp != 1 && d * d <= q) {
    if (temp % d == 0) {
      del.push_back(d);
      temp /= d;
    } else
      d++;
  }
  if (temp != 1) del.push_back(temp);
  if (del.size() == 2)
    cout << 2;
  else if (del.size() < 2)
    cout << 1 << endl << 0;
  else {
    cout << 1 << endl << del[0] * del[1];
  }
  return 0;
}
