#include <bits/stdc++.h>
using std::vector;
const int MAXN = 10000000;
bool notp[MAXN + 10];
vector<int> prime;
void Build() {
  notp[0] = notp[1] = true;
  for (int i = 4; i <= MAXN; i += 2) notp[i] = true;
  for (int i = 9; i <= MAXN; i += 3) notp[i] = true;
  int x = (int)sqrt(MAXN) + 1;
  for (int i = 5, k = 2; i <= x; i += k, k = 6 - k)
    if (notp[i] == false)
      for (int j = i * i; j <= MAXN; j += i) notp[j] = true;
  prime.push_back(2);
  prime.push_back(3);
  for (int i = 5, k = 2; i <= MAXN; i += k, k = 6 - k)
    if (!notp[i]) prime.push_back(i);
}
bool check(long long x) {
  if (x <= 1) return false;
  long long v = (long long)sqrt(x) + 1;
  int size = prime.size();
  for (int i = 0; i < size && prime[i] <= v; ++i)
    if ((x % prime[i]) == 0) return false;
  return true;
}
int main() {
  Build();
  long long n;
  while (scanf("%I64d", &n) != EOF) {
    if (n == 1) {
      puts("1\n0");
      continue;
    }
    if (n <= MAXN) {
      if (!notp[n]) {
        puts("1\n0");
        continue;
      } else {
        vector<long long> ans;
        long long v = (long long)sqrt(n) + 1;
        int size = prime.size();
        for (int i = 0; i < size && n > 1 && prime[i] <= n; ++i)
          if (n > 1 && (n % prime[i]) == 0) {
            while (n > 1 && (n % prime[i]) == 0) {
              ans.push_back(prime[i]);
              n /= prime[i];
            }
          }
        if (check(n)) ans.push_back(n);
        if (ans.size() <= 2) {
          puts("2");
        } else {
          printf("1\n%I64d\n", ans[0] * ans[1]);
        }
      }
    } else {
      if (check(n)) {
        puts("1\n0");
        continue;
      } else {
        vector<long long> ans;
        long long v = (long long)sqrt(n) + 1;
        int size = prime.size();
        for (int i = 0; i < size && n > 1 && prime[i] <= n; ++i)
          if (n > 1 && (n % prime[i]) == 0) {
            while (n > 1 && (n % prime[i]) == 0) {
              ans.push_back(prime[i]);
              n /= prime[i];
            }
          }
        if (check(n)) ans.push_back(n);
        if (ans.size() <= 2) {
          puts("2");
        } else {
          printf("1\n%I64d\n", ans[0] * ans[1]);
        }
      }
    }
  }
  return 0;
}
