#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e17;
const int N = 1e5 + 1;
const long long mod = 1e9 + 7;
const int bits = 19;
void solve() {
  long long n;
  cin >> n;
  long long on = n;
  vector<long long> store;
  for (long long i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      store.push_back(i);
      n /= i;
    }
  }
  if (n != 1 && n != on) store.push_back(n);
  if (store.size() == 2) {
    cout << 2 << "\n";
  } else if (store.size() == 0) {
    cout << "1\n0\n";
  } else {
    cout << 1 << "\n" << store[0] * store[1] << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  std::cout << std::fixed << std::setprecision(20);
  ;
  int t = 1;
  while (t--) {
    solve();
  }
}
