#include <bits/stdc++.h>
using namespace std;
map<long long, int> getFactors(long long n) {
  long long num = n;
  long long sqrn = sqrt(n);
  map<long long, int> ret;
  for (long long i = 2; i <= sqrn; i++)
    while (num % i == 0) {
      ret[i]++;
      num /= i;
    }
  if (num > 1 && num != n) ret[num]++;
  return ret;
}
void solve(long long n) {
  map<long long, int> factors = getFactors(n);
  if (factors.size() == 0) {
    cout << 1 << '\n' << 0 << '\n';
    return;
  }
  vector<long long> keys;
  for (auto &p : factors) keys.push_back(p.first);
  if (keys.size() > 2 ||
      (keys.size() == 2 && (factors[keys[0]] > 1 || factors[keys[1]] > 1))) {
    cout << 1 << '\n';
    cout << keys[0] * keys[1] << '\n';
    return;
  }
  if (keys.size() == 1 && factors[keys[0]] > 2) {
    cout << 1 << '\n';
    cout << keys[0] * keys[0] << '\n';
    return;
  }
  cout << 2 << '\n';
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  solve(n);
  return 0;
}
