#include <bits/stdc++.h>
using namespace std;
long long sol(long long num, bool pe, int l = 0) {
  long long ans = -1;
  bool p = false;
  for (long long i = 2; i * i <= num; ++i) {
    if (num % i == 0) {
      p = true;
      if (sol(i, !pe, l + 1) != -1)
        ans = i;
      else if (l) {
        ans = -1;
        break;
      }
      if (sol(num / i, !pe, l + 1) != -1)
        ans = num / i;
      else if (l) {
        ans = -1;
        break;
      }
    }
  }
  if (!p) {
    if (pe)
      return -1;
    else
      return 0;
  }
  return ans;
}
int main() {
  long long q;
  while (cin >> q) {
    long long ans = sol(q, 0);
    if (ans == -1)
      cout << 2 << endl;
    else
      cout << 1 << '\n' << ans << endl;
  }
  return 0;
}
