#include <bits/stdc++.h>
using namespace std;
long long Q, result = 1, cnt;
int isPrime[4000000];
vector<int> prime;
void sieve() {
  long long n = sqrt(Q);
  for (long long i = 0; i <= n; i++) isPrime[i] = 1;
  isPrime[0] = isPrime[1] = 0;
  for (long long i = 0; i <= n; i++)
    if (isPrime[i]) {
      for (long long j = i * i; j <= n; j += i) isPrime[j] = 0;
      prime.push_back(i);
    }
}
int main() {
  cin >> Q;
  sieve();
  for (int i = 0; i < prime.size() && cnt < 2; i++)
    if (Q % prime[i] == 0) {
      cnt++;
      result *= prime[i];
      Q /= prime[i];
      i--;
    }
  if (!cnt)
    cout << 1 << endl << 0 << endl;
  else if (cnt == 2 && Q != 1)
    cout << 1 << endl << result << endl;
  else
    cout << 2 << endl;
  return 0;
}
