#include <bits/stdc++.h>
using namespace std;
long long solve(long long q) {
  if (q == 1) return 0;
  long long p = 2;
  vector<long long> factors;
  while (p <= q / p) {
    while (q % p == 0) {
      factors.push_back(p);
      q = q / p;
    }
    p++;
  }
  if (q != 1) factors.push_back(q);
  if (factors.size() == 1) return 0;
  if (factors.size() == 2) return -1;
  return factors[0] * factors[1];
}
int main() {
  long long q;
  cin >> q;
  int turn = 0;
  while (true) {
    long long p = solve(q);
    turn = !turn;
    if (p == -1) {
      cout << (turn + 1) << endl;
      if (!turn) cout << q << endl;
      break;
    } else if (p == 0) {
      cout << (!turn + 1) << endl;
      if (turn) cout << 0 << endl;
      break;
    }
    q = p;
  }
}
