#include <bits/stdc++.h>
using namespace std;
long long getprime(long long n) {
  long long i;
  bool flag = true;
  for (i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      flag = false;
      break;
    }
  }
  if (flag)
    return 0;
  else
    return i;
}
int main() {
  long long n, a, b;
  cin >> n;
  a = getprime(n);
  if (a == 0)
    cout << "1\n0";
  else {
    b = getprime(n / a);
    if (b == 0)
      cout << "2\n";
    else {
      cout << "1\n";
      a = a * b;
      cout << a << endl;
    }
  }
  return 0;
}
