#include <bits/stdc++.h>
using namespace std;
void is_prime(long long int d, vector<long long int>& factor) {
  auto limit = sqrt(d);
  stack<long long int> div;
  for (long long int i = 2; i <= limit; i++)
    if (d % i == 0) {
      factor.push_back(i);
      div.push(d / i);
    }
  while (!div.empty()) {
    factor.push_back(div.top());
    div.pop();
  }
}
int main() {
  long long int n;
  vector<long long int> factor1, factor2;
  cin >> n;
  is_prime(n, factor1);
  if (factor1.size() == 0)
    cout << 1 << endl << 0;
  else {
    bool flag = false;
    for (auto& i : factor1) {
      is_prime(i, factor2);
      if (factor2.size() > 0) {
        flag = true;
        cout << 1 << endl << i;
        break;
      }
    }
    if (!flag) cout << 2;
  }
  return 0;
}
