#include <bits/stdc++.h>
using namespace std;
unsigned int sieve[((3300000 + 31) / 32)];
vector<int> primes;
void sieve_erastothenes() {
  register unsigned int p;
  primes.clear();
  primes.reserve((int)ceil((3300000 + 1) / log(3300000 + 1) *
                           (1 + 1.2762 / log(3300000 + 1))));
  sieve[0] |= (1 << 0) | (1 << 1);
  for (p = 2;; ++p) {
    unsigned long long p2 = ((unsigned long long)p) * ((unsigned long long)p);
    if (p2 > 3300000) break;
    if (((sieve[(p) >> 5] >> ((p)&31)) & 1)) continue;
    primes.push_back(p);
    for (unsigned long long k = p2; k <= 3300000; k += p)
      sieve[k >> 5] |= 1 << (k & 31);
  }
  for (; p <= 3300000; ++p) {
    if (((sieve[(p) >> 5] >> ((p)&31)) & 1)) continue;
    primes.push_back(p);
  }
}
void factorization(unsigned long long n, vector<unsigned long long>& fv) {
  fv.clear();
  for (int i = 0; i < primes.size(); ++i) {
    unsigned long long p = primes[i];
    if (p * p > n) break;
    int cnt = 0;
    for (; (n % p) == 0; n /= p) {
      fv.push_back(p);
      if (fv.size() > 2) return;
    }
  }
  if (n > 1) fv.push_back(n);
}
int main(int argc, char* argv[]) {
  sieve_erastothenes();
  long long Q;
  cin >> Q;
  vector<unsigned long long> V;
  factorization(Q, V);
  int winner = 2;
  long long move = -1;
  switch (V.size()) {
    case 0:
    case 1:
      winner = 1, move = 0;
      break;
    case 2:
      winner = 2, move = -1;
      break;
    default:
      winner = 1, move = V[0] * V[1];
      break;
  }
  cout << winner << endl;
  if (winner == 1) cout << move << endl;
  return 0;
}
