#include <bits/stdc++.h>
using namespace std;
int main() {
  long long q;
  cin >> q;
  if (q == 1) {
    cout << 1 << endl << 0;
    return 0;
  }
  long long mindiv = -1;
  for (long long i = 2; i * i <= q; i++) {
    if (q % i == 0) {
      mindiv = i;
      break;
    }
  }
  if (mindiv == -1) {
    cout << 1 << endl << 0;
    return 0;
  }
  long long an = q / mindiv;
  long long gh = -1;
  for (long long i = 2; i * i <= an; i++) {
    if (an % i == 0) {
      gh = i;
      break;
    }
  }
  if (gh == -1) {
    cout << 2;
    return 0;
  }
  cout << 1 << endl << mindiv * gh;
}
