#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, t;
  cin >> n;
  t = n;
  long long ar[5];
  long long sq = (long long)sqrt((double)n);
  int cnt = 0;
  for (long long i = 2; i <= sq; i++) {
    while (!(n % i)) {
      n /= i;
      ar[cnt++] = i;
      if (cnt == 2) break;
    }
    if (cnt == 2) break;
  }
  if (n > 1 && cnt < 2) {
    ar[cnt++] = n;
  }
  if (cnt == 0 || cnt == 1) {
    cout << 1 << endl << 0 << endl;
  } else {
    if ((ar[0] * ar[1]) == t)
      cout << 2 << endl;
    else
      cout << 1 << endl << (ar[0] * ar[1]) << endl;
  }
  return 0;
}
