#include <bits/stdc++.h>
using namespace std;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1};
const int dc[] = {0, 1, 0, -1, 1, -1, -1, 1};
const double eps = 1e-9;
const int INF = 0x7FFFFFFF;
const long long INFLL = 0x7FFFFFFFFFFFFFFFLL;
const double pi = acos(-1);
vector<long long> vc, prime;
long long n;
vector<bool> ip;
void init() {
  ip.assign(3200000, 0);
  ip[0] = ip[1] = 1;
  for (long long(i) = (2), _t = (3200000); i < (_t); ++(i)) {
    if (!ip[i]) {
      prime.push_back(i);
      long long c = i * i;
      while (c < 3200000) {
        ip[c] = 1;
        c += i;
      }
    }
  }
  return;
}
inline bool isprime(long long x) {
  if (!(x % 2) && x != 2) return 0;
  for (long long i = 3, z = sqrt(x); i <= z; i += 2)
    if (!(x % i)) return 0;
  return 1;
}
int main() {
  init();
  cin >> n;
  if (n == 1) {
    puts("1");
    puts("0");
    return 0;
  }
  if (isprime(n)) {
    puts("1");
    puts("0");
    return 0;
  }
  int c = 0;
  for (int(i) = (0), _t = ((long long)prime.size()); i < (_t); ++(i)) {
    while (!(n % prime[i])) {
      n /= prime[i];
      ++c;
      vc.push_back(prime[i]);
      if (c == 2) break;
    }
    if (n == 1) break;
    if (c == 2) break;
  }
  if ((long long)vc.size() == 2 && n != 1) {
    puts("1");
    cout << vc[0] * vc[1] << endl;
    return 0;
  }
  puts("2");
  return 0;
}
