#include <bits/stdc++.h>
using namespace std;
bool ip(long long x) {
  for (long long i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
int main() {
  long long n;
  cin >> n;
  set<long long> dv;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      dv.insert(i);
      dv.insert(n / i);
    }
  }
  if (dv.size() == 0) {
    cout << 1 << endl << 0 << endl;
    return 0;
  }
  for (set<long long>::iterator it = dv.begin(); it != dv.end(); it++) {
    if (ip(*it)) continue;
    cout << 1 << endl << *it << endl;
    return 0;
  }
  cout << 2 << endl;
}
