#include <bits/stdc++.h>
using namespace std;
const long long N = 3162300;
long long h[N];
vector<long long> v, a;
void init() {
  for (long long i = 2; i <= sqrt(N); i++) {
    if (h[i] == 0) {
      for (long long j = i * 2; j < N; j += i) {
        h[j]++;
      }
    }
  }
  for (long long i = 2; i < N; i++)
    if (h[i] == 0) v.push_back(i);
}
long long fun(long long n) {
  long long sum = 0;
  for (auto it : v) {
    if (n % it == 0) {
      long long p = it;
      while (1) {
        if (n % p != 0) break;
        a.push_back(it);
        sum++;
        p = p * it;
      }
    }
  }
  return sum;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  init();
  long long n;
  cin >> n;
  long long p = fun(n);
  if (p == 0 or n == 1 or (p == 1 and a[0] == n))
    return cout << 1 << "\n" << 0, 0;
  if (p == 1) return cout << "2", 0;
  if (a[0] * a[1] != n) {
    cout << 1 << "\n";
    cout << a[0] * a[1];
  } else
    cout << "2";
}
