#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, h, i, j, t, m, l, r, q;
  long long p = 0, k, w, z, x, y, d, p1, h1;
  string s = "", st = "", s1 = "", s2 = "";
  q = 1;
  for (l = 0; l < q; l++) {
    std::cin >> n;
    x = 0;
    p = 0;
    if (n == 4)
      x = 1;
    else if (n > 5) {
      if (n % 2 == 0) {
        h = n / 2;
        for (i = 2; i * i <= h; i++) {
          if (h % i == 0) break;
        }
        if (h % i == 0)
          p = 2 * i;
        else
          x = 1;
      } else {
        j = 0;
        p = 1;
        for (i = 3; i * i <= n; i += 2) {
          if (j != 2 && n % i == 0) {
            p = p * i, j++;
            h = n / i;
            if (h % i == 0 && j == 1) p = p * i, j++;
          }
          if (j == 2) break;
        }
        if (j == 1) x = 1;
      }
    }
    if (p == 1) p = 0;
    if (p == n) p = 0, x = 1;
    std::cout << x + 1 << std::endl;
    if (x == 0) std::cout << p << std::endl;
  }
  return 0;
}
