#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e6 + 5e5 + 1;
bool cp(long long x) {
  if (x == 2) return true;
  if (x % 2 == 0) return false;
  if (x == 1) return false;
  for (int i = 3; i <= sqrt(x); i += 2)
    if (x % i == 0) return false;
  return true;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> vc;
  if (cp(n) || n == 1) {
    cout << 1 << "\n" << 0 << "\n";
    exit(0);
  }
  for (long long i = 2; i <= sqrt(n); i++) {
    if (n % i) continue;
    bool f, s;
    if (i == 97 || n / i == 97) {
    }
    f = cp(i);
    s = cp(n / i);
    if (f && s) return cout << 2 << "\n", 0;
    if (vc.size() < 2) {
      if (f) {
        if (n / i % i == 0) vc.push_back(i);
        vc.push_back(i);
      }
      if (s) {
        if (n / (n / i) % (n / i) == 0) vc.push_back(n / i);
        vc.push_back(n / i);
      }
    }
  }
  cout << 1 << "\n" << 1LL * vc[0] * vc[1] << "\n";
}
