#include <bits/stdc++.h>
using namespace std;
void ASS(bool b) {
  if (!b) {
    ++*(int*)0;
  }
}
#pragma comment(linker, "/STACK:106777216")
vector<long long> v;
map<long long, int> dp;
long long D(long long n) {
  map<long long, int>::iterator it = dp.find(n);
  if (it != dp.end()) return it->second;
  int res = -1;
  int cnt = 0;
  for (int i = 0; i < (int)(v.size()); i++) {
    if (v[i] >= n) break;
    if (n % v[i] == 0) {
      cnt++;
      if (D(v[i]) == -1) {
        res = 1;
        break;
      }
    }
  }
  if (cnt == 0) res = 1;
  dp[n] = res;
  return res;
}
int main() {
  long long n;
  cin >> n;
  int pr = 1 + sqrt(n * 1.0);
  for (int i = 2; i <= pr && i < n; i++)
    if (n % i == 0) {
      v.push_back(i);
      v.push_back(n / i);
    }
  if (v.size() == 0) {
    cout << 1 << endl;
    cout << 0 << endl;
    return 0;
  }
  sort(v.begin(), v.end());
  int res = D(n);
  for (int i = 0; i < (int)(v.size()); i++)
    if (D(v[i]) == -1) {
      cout << 1 << endl;
      cout << v[i] << endl;
      return 0;
    }
  cout << 2 << endl;
  return 0;
}
