#include <bits/stdc++.h>
using namespace std;
long long n;
void solve() {
  cin >> n;
  bool prime[2 * (long long)ceil(sqrt(n)) + 2];
  for (long long i = 0; i <= 2 * ceil(sqrt(n)) + 1; ++i) {
    prime[i] = true;
  }
  for (long long i = 2; i <= 2 * ceil(sqrt(n)) + 1; ++i) {
    for (long long j = 2 * i; j <= 2 * ceil(sqrt(n)); j += i) prime[j] = false;
  }
  long long c = 0;
  vector<long long> a;
  long long z = 2 * ceil(sqrt(n)) + 1, x = n;
  for (long long i = 2; i <= z; ++i) {
    while (prime[i] && x % i == 0 && i != n) {
      ++c;
      x /= i;
      a.push_back(i);
    }
    if (c > 2) break;
  }
  if (x != 1 && x != n) {
    c++;
    a.push_back(x);
  }
  if (c > 2) {
    cout << 1 << "\n";
    cout << a[0] * a[1] << "\n";
  } else if (c == 0) {
    cout << 1 << "\n";
    cout << 0 << "\n";
  } else
    cout << 2 << "\n";
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
