#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1, -1, -1, 0, 1, -1, 0, 1};
bool a[3200400];
vector<int> primelist;
void seive(void) {
  a[1] = 1;
  a[0] = 1;
  int k = 1;
  for (int i = 4; i <= 3200000; i += 2) a[i] = 1;
  for (int i = 3; i * i <= 3200000; i += 2) {
    if (a[i] == false) {
      for (int j = i * i; j <= 3200000; j += 2 * i) {
        a[j] = true;
      }
    }
  }
  primelist.push_back(2);
  for (int i = 3; i <= 3200000; i++)
    if (a[i] == 0) primelist.push_back(i);
}
int main() {
  seive();
  long long n;
  cin >> n;
  long long nn = n;
  long long k = sqrt(n);
  vector<long long> v;
  for (int i = 0; primelist[i] <= k; i++) {
    while (n % primelist[i] == 0) {
      v.push_back(primelist[i]);
      n /= primelist[i];
      if (v.size() == 2) break;
    }
    if (v.size() == 2) break;
  }
  if (v.size() == 0)
    cout << 1 << endl << 0 << endl;
  else if (v.size() == 2 && v[0] * v[1] != nn)
    cout << 1 << endl << v[0] * v[1] << endl;
  else
    cout << 2 << endl;
  return 0;
}
