#include <bits/stdc++.h>
using namespace std;
int notPrime[10000000];
int main() {
  long long N;
  int pFactorCount = 0;
  long long res = 1;
  cin >> N;
  for (int i = (2); i < (N); ++i) {
    if (1ll * i * i > N) break;
    if (!notPrime[i]) {
      if (N % i == 0) {
        long long n = N;
        while (n % i == 0) {
          n /= i;
          if (n == 1) break;
          pFactorCount++;
          if (pFactorCount <= 2) res *= i;
        }
      }
      for (int j = (i); j < (N); ++j) {
        if (1ll * j * j > N || 1ll * i * j >= 10000000) break;
        notPrime[1ll * i * j] = 1;
      }
    }
  }
  if (pFactorCount == 0)
    cout << 1 << endl << 0;
  else if (pFactorCount >= 2)
    cout << 1 << endl << res;
  else
    cout << 2;
  return 0;
}
