#include <bits/stdc++.h>
using namespace std;
long long isprime(long long n) {
  for (long long i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return i;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin.tie(0);
  long long q, first = -1, second = -1;
  cin >> q;
  long long k = isprime(q);
  if (k == 0) {
    cout << "1\n0\n";
    return 0;
  }
  for (long long i = k; i < q; i++) {
    if (isprime(i) == 0) {
      if (q % i == 0) {
        if (first == -1) {
          first = i;
          second = q / i;
          break;
        }
      }
    }
  }
  long long a = isprime(second);
  if (a == 0) {
    cout << "2";
  } else {
    cout << "1\n" << a * first;
  }
  return 0;
}
