#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long n) {
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
vector<long long> trial_division(long long n) {
  vector<long long> factorization;
  while (n % 2 == 0) {
    factorization.push_back(2);
    n /= 2;
  }
  for (long long d = 3; d * d <= n; d += 2) {
    while (n % d == 0) {
      factorization.push_back(d);
      n /= d;
    }
  }
  if (n > 1) factorization.push_back(n);
  return factorization;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  if (n == 1 || isPrime(n)) {
    cout << 1 << "\n" << 0;
    return 0;
  }
  vector<long long> pf = trial_division(n);
  if (pf.size() == 2) {
    cout << 2 << "\n";
    return 0;
  }
  cout << 1 << "\n" << pf[0] * pf[1];
  return 0;
}
