#include <bits/stdc++.h>
using namespace std;
vector<long long> p;
std::vector<long long> prime;
bool is_composite[10000009];
void sieve(long long n) {
  std::fill(is_composite, is_composite + n, false);
  for (long long i = 2; i < n; ++i) {
    if (!is_composite[i]) prime.push_back(i);
    for (long long j = 0; j < prime.size() && i * prime[j] < n; ++j) {
      is_composite[i * prime[j]] = true;
      if (i % prime[j] == 0) break;
    }
  }
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
void solve(long long n) {
  long long temp = n;
  for (long long i = 2; i * i <= n; i++) {
    if (!is_composite[i]) {
      while (temp % i == 0) {
        p.push_back(i);
        temp = temp / i;
        if (p.size() == 2) break;
      }
    }
    if (p.size() == 2) break;
  }
}
int main() {
  sieve(10000009);
  long long n;
  cin >> n;
  if (n == 1) {
    cout << 1 << endl;
    cout << 0 << endl;
    return 0;
  }
  if (isPrime(n)) {
    cout << 1 << endl;
    cout << 0 << endl;
    return 0;
  }
  if (n == 2) {
    cout << 1 << endl;
    cout << 0 << endl;
    return 0;
  }
  solve(n);
  if (p.size() == 1) {
    cout << 2 << endl;
    return 0;
  }
  if (p[0] * p[1] == n) {
    cout << 2 << endl;
    return 0;
  }
  cout << 1 << endl;
  cout << p[0] * p[1] << endl;
  return 0;
}
