#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, f = 0;
  cin >> n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0 && f == 0) {
      f = i;
      n /= i;
    }
    if (n % i == 0 && n > i) {
      cout << "1\n" << f * i;
      return 0;
    }
  }
  if (f == 0)
    cout << "1\n0";
  else
    cout << 2;
  return 0;
}
