#include <bits/stdc++.h>
using namespace std;
vector<long long> ans;
bool trivial(long long x) {
  if (x <= 2) return 1;
  if (x % 2 == 0) return 0;
  for (long long i = 3; i * i <= x; i += 2)
    if (x % i == 0) return 0;
  return 1;
}
int main() {
  long long n, d = 2;
  cin >> n;
  if (trivial(n)) {
    cout << "1\n0";
    return 0;
  }
  while (n > 1) {
    while (n % d == 0) {
      ans.push_back(d);
      n /= d;
      if (ans.size() > 2) break;
    }
    if (ans.size() > 2) break;
    d++;
    if (d * d > n) d = n;
  }
  if (ans.size() > 2)
    cout << "1\n" << ans[0] * ans[1];
  else
    cout << "2";
}
