#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e17 + 7;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long q, n;
  cin >> q;
  n = q;
  long long ans = -1;
  for (long long i = 2; i * i <= q; i++) {
    if (q % i == 0) {
      if (ans > 0) {
        cout << 1 << "\n" << ans * i << "\n";
        return 0;
      }
      ans = i;
      while (q % i == 0) q /= i;
    }
  }
  if (ans == -1)
    cout << 1 << "\n" << 0 << "\n";
  else {
    if (ans * ans != n && (n % (ans * ans) == 0)) {
      cout << 1 << "\n" << ans * ans << "\n";
    } else
      cout << 2 << "\n";
  }
  return 0;
}
