#include <bits/stdc++.h>
using namespace std;
long long int hell = 9223372036854775807;
bool a[40000000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  t = 1;
  while (t--) {
    for (long long int i = 1; i < 4000000; i++) {
      a[i] = true;
    }
    for (long long int i = 2; i * i < 4000000; i++) {
      if (a[i])
        for (long long int j = i * i; j < 4000000; j = j + i) a[j] = false;
    }
    long long int n;
    cin >> n;
    vector<long long int> v;
    long long int k = 0;
    for (long long int i = 2; i * i <= n; i++) {
      if (n % i == 0 && a[i]) {
        v.push_back(i);
        if (n % (i * i) == 0) v.push_back(i);
      }
      if (n % i == 0) k++;
    }
    if (k == 0)
      cout << 1 << endl << 0;
    else if (v.size() > 1) {
      if (v[0] * v[1] < n)
        cout << '1' << endl << v[0] * v[1];
      else
        cout << '2';
    } else
      cout << '2';
  }
  return 0;
}
