#include <bits/stdc++.h>
using namespace std;
map<long long, bool> f;
bool dfs(long long x) {
  if (1 == x) return true;
  if (f.find(x) != f.end()) return f[x];
  bool prime = true;
  for (long long i = 2; prime && i <= x / i; ++i)
    if (x % i == 0) prime = false;
  if (prime) return f[x] = true;
  for (long long i = 2; i <= x / i; ++i)
    if (x % i == 0) {
      if (!dfs(i) || !dfs(x / i)) return f[x] = true;
    }
  return f[x] = false;
}
int main() {
  long long n;
  cin >> n;
  if (dfs(n)) {
    puts("1");
    bool find = false;
    for (long long i = 2; !find && i <= n / i; ++i)
      if (n % i == 0) {
        if (!dfs(i)) {
          cout << i << endl;
          find = true;
          return 0;
        }
        if (!dfs(n / i)) {
          cout << n / i << endl;
          find = true;
          return 0;
        }
      }
    if (!find) puts("0");
  } else
    puts("2");
  return 0;
}
