#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > factor(long long x) {
  vector<pair<long long, long long> > res;
  for (long long i = 2; i * i <= x and x != 1; ++i) {
    int qtt = 0;
    while (x % i == 0) {
      ++qtt;
      x /= i;
    }
    if (qtt > 0) res.push_back(pair<long long, long long>(i, qtt));
  }
  if (x != 1) res.push_back(pair<long long, long long>(x, 1));
  return res;
}
int main() {
  long long n;
  cin >> n;
  if (n == 1)
    cout << 1 << endl << 0 << endl;
  else {
    vector<pair<long long, long long> > v = factor(n);
    if (v.size() > 2)
      cout << 1 << endl << v[0].first * v[1].first << endl;
    else if (v.size() == 2) {
      if (v[0].second == 1 and v[1].second == 1)
        cout << 2 << endl;
      else
        cout << 1 << endl << v[0].first * v[1].first << endl;
    } else {
      if (v[0].second == 1)
        cout << 1 << endl << 0 << endl;
      else if (v[0].second > 2)
        cout << 1 << endl << v[0].first * v[0].first << endl;
      else
        cout << 2 << endl;
    }
  }
}
