#include <bits/stdc++.h>
using namespace std;
bitset<10000000> p;
vector<int> v;
int main(int argc, char const *argv[]) {
  long long n;
  cin >> n;
  long long move = 0;
  int player = 2;
  if (n == 1LL) {
    cout << 1 << endl << 0 << endl;
    exit(0);
  }
  int r = (long long)sqrt(n);
  int R = (long long)sqrt(r);
  for (int i = 3; i <= R; i += 2) {
    if (p[i] == 1) continue;
    for (int j = i * i; j <= r; j += (i << 1)) {
      p[j] = 1;
    }
  }
  v.push_back(2);
  for (int i = 3; i <= r; i += 2) {
    if (p[i] == 0) v.push_back(i);
  }
  long long N = n;
  int count = 0;
  vector<long long> factor;
  for (unsigned i = 0; i < v.size(); i++) {
    long long prime = v[i];
    if (prime * prime > N) break;
    int cnt = 0;
    while (N % prime == 0) {
      ++cnt;
      N /= prime;
    }
    if (cnt) {
      count += 1;
      if (cnt >= 2 and prime * prime != n) {
        player = 1;
        move = (prime * prime);
      }
      factor.push_back(prime);
    }
  }
  if (N > 1) {
    count += 1;
    factor.push_back(N);
  }
  if (count > 2) {
    player = 1;
    move = (factor[0] * factor[1]);
  }
  if (factor[0] == n) {
    player = 1;
    move = 0;
  }
  if (player == 1)
    cout << 1 << endl << move << endl;
  else
    cout << 2 << endl;
  return 0;
}
