#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a = -1, b = -1;
  long long t = n;
  for (long long i = 2; i * i <= n; i++) {
    if (t % i == 0 && a == -1 && t / i != 1) {
      a = i;
      t = t / i;
      if (t % i == 0 && b == -1 && t / i != 1) {
        b = i;
        t = t / i;
      }
    } else if (t % i == 0 && b == -1 && t / i != 1) {
      b = i;
      t = t / i;
    }
    if (a != -1 && b != -1) {
      cout << 1 << "\n";
      cout << a * b;
      return 0;
    }
  }
  if (b == -1 && a != -1) {
    cout << 2;
    return 0;
  }
  cout << 1 << "\n";
  cout << 0;
  return 0;
}
