#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  long long int inp;
  cin >> inp;
  int sqr = sqrt(inp);
  int currd = 1;
  bool fin = false;
  for (int i = 2; i <= sqr; i++) {
    if (inp % i == 0) {
      inp /= i;
      if (currd != 1) {
        fin = true;
        if (inp == 1) {
          cout << "2";
        } else {
          cout << "1" << endl << currd * i;
        }
        break;
      }
      currd = i;
      i--;
    }
  }
  if (!fin) {
    if (currd == 1) {
      cout << "1" << endl << "0";
    } else
      cout << "2";
  }
  return 0;
}
