#include <bits/stdc++.h>
using namespace std;
int main() {
  long long q, temp;
  cin >> q;
  for (long long i = 2; i * i <= q; i++) {
    if (q % i == 0) {
      temp = q / i;
      for (long long j = 2; j * j <= temp; j++) {
        if (temp % j == 0) {
          cout << "1\n" << i * j;
          return 0;
        }
      }
      cout << "2";
      return 0;
    }
  }
  cout << "1\n0";
  return 0;
}
