#include <bits/stdc++.h>
using namespace std;
long long pw(long long b, long long p) {
  if (!p) return 1;
  long long sq = pw(b, p / 2);
  sq *= sq;
  if (p % 2) sq *= b;
  return sq;
}
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long sd(long long x) { return x < 10 ? x : x % 10 + sd(x / 10); }
long long lcm(long long a, long long b) { return ((a * b) / gcd(a, b)); }
int main() {
  long long s, q, a = -1, b = -1;
  scanf("%lld", &q);
  s = q;
  if (q == 1) return puts("1\n0");
  for (long long i = 2; i * i <= q; i += 1 + (i & 1)) {
    if (q % i == 0) {
      if (a == -1)
        a = i;
      else
        b = i;
      q /= i;
      if (q % i == 0) b = i;
      while (q % i == 0) q /= i;
    }
  }
  if (q > 1)
    if (a == -1)
      a = q;
    else
      b = q;
  if (b == -1) return puts("1\n0");
  if (s == a * b) return puts("2");
  printf("1\n%lld", a * b);
}
