#include <bits/stdc++.h>
using namespace std;
long long n;
bool isprime[5000005];
long long prime[2000005];
int cnt, tot;
long long ans;
void getprime() {
  for (int i = 2; i <= 5000000; i++) {
    if (isprime[i]) {
      prime[tot++] = i;
      for (int j = 2 * i; j <= 5000000; j += i) {
        isprime[j] = false;
      }
    }
  }
  tot--;
}
int isp(long long n) {
  if (n < 5000000) return isprime[n];
  for (int i = 1; prime[i] * prime[i] <= n && prime[i] != 0; i++)
    if (n % prime[i] == 0) return 0;
  return 1;
}
int main() {
  tot = 1;
  ans = 1;
  memset(isprime, true, sizeof(isprime));
  getprime();
  cin >> n;
  if (isp(n)) {
    cout << 1 << endl << 0;
    return 0;
  }
  if (n == 1) {
    cout << 1 << endl << 0;
    return 0;
  }
  long long cn = n;
  for (int i = 1; i <= tot; i++) {
    if (cnt >= 2) break;
    while (n % prime[i] == 0) {
      if (cnt >= 2) break;
      n /= prime[i];
      ans *= prime[i];
      cnt++;
    }
  }
  if (n != 1) cnt++;
  if (cnt == 1) {
    cout << 1 << endl << 0;
    return 0;
  }
  if (cnt == 2)
    cout << 2;
  else {
    cout << 1 << endl;
    cout << ans;
  }
  return 0;
}
