#include <bits/stdc++.h>
using namespace std;
vector<long long int> fac;
void primeFactors(long long int n) {
  while (n % 2 == 0) {
    fac.push_back(2);
    n = n / 2;
  }
  for (long long int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      fac.push_back(i);
      n = n / i;
    }
  }
  if (n > 2) fac.push_back(n);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int T = 1;
  while (T--) {
    long long int n;
    cin >> n;
    if (n == 1) {
      cout << 1;
      cout << "\n";
      cout << 0;
      continue;
    }
    primeFactors(n);
    if (fac.size() == 1) {
      cout << 1;
      cout << "\n";
      cout << 0;
      continue;
    }
    if (fac.size() == 2) {
      cout << 2;
      continue;
    }
    if (fac.size() > 2) {
      cout << 1;
      cout << "\n";
      cout << fac[0] * fac[1];
    }
  }
  return 0;
}
