#include <bits/stdc++.h>
using namespace std;
bool not_prime[5000001];
vector<int> primes;
void sieve() {
  primes.push_back(2);
  for (int i = 4; i < 5000001; i += 2) {
    not_prime[i] = true;
  }
  for (int i = 3; i < 5000001; i += 2) {
    if (!not_prime[i]) {
      primes.push_back(i);
      for (int j = 3 * i; j < 5000001; j += i) {
        not_prime[i] = true;
      }
    }
  }
}
int main() {
  sieve();
  long long n;
  long long out = 1;
  bool found = false;
  cin >> n;
  int i;
  for (i = 0; (long long)primes[i] * primes[i] < n && !found; ++i) {
    long long temp = n;
    while (temp % primes[i] == 0) {
      temp /= primes[i];
      if (out != 1) {
        out *= primes[i];
        found = true;
        break;
      } else {
        out = primes[i];
      }
    }
  }
  if ((long long)primes[i] * primes[i] == n) {
    cout << "2\n";
    return 0;
  }
  if (found || out == 1) {
    if (out == 1) out = 0;
    cout << "1\n" << out << endl;
  } else {
    cout << "2\n";
  }
  return 0;
}
