#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a;
  cin >> a;
  if (a == 1) {
    cout << 1 << endl << 0;
    return 0;
  }
  int sum = 0;
  vector<int> r;
  for (long long i = 2; i * i <= a; i++) {
    while (a % i == 0) {
      sum++;
      a /= i;
      r.push_back(i);
    }
  }
  if (a > 1) {
    sum++;
    r.push_back(a);
  }
  if (sum != 2) {
    cout << 1 << endl;
    int res = 1;
    if (r.size() == 1) {
      cout << 0;
      return 0;
    }
    for (int i = 0; i < 2; i++) {
      res *= r[i];
    }
    cout << res << endl;
    return 0;
  }
  cout << 2;
  return 0;
}
