#include <bits/stdc++.h>
using namespace std;
int t, p[5000005];
bool bo[5000005];
long long n;
void Prime() {
  int i, j, maxi = int(sqrt(1e13));
  for (i = 2; i <= maxi; ++i) {
    if (!bo[i]) p[++t] = i;
    for (j = 1; j <= t; ++j) {
      if ((long long)i * p[j] > maxi) break;
      bo[i * p[j]] = 1;
      if (i % p[j] == 0) break;
    }
  }
}
int main() {
  Prime();
  scanf("%I64d", &n);
  long long nn = n;
  if (n == 1) {
    printf("%d\n%d\n", 1, 0);
    return 0;
  }
  int cnt = 0;
  long long q = 1;
  for (int i = 1; i <= t && n > 1 && p[i] <= n; ++i) {
    while (n % p[i] == 0) {
      ++cnt;
      if (cnt <= 2) q *= p[i];
      n /= p[i];
    }
    if (cnt >= 3) break;
  }
  if (n != 1) ++cnt;
  if (cnt >= 3 || cnt == 1)
    printf("%d\n%d\n", 1, cnt != 1 ? q : 0);
  else
    printf("%d\n", 2);
  return 0;
}
