#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const long long MOD = 1e9 + 7;
const long long maxn = 1e7;
long long p[maxn];
void build_primes(long long maxn) {
  memset(p, 0, sizeof p);
  p[2] = 1;
  for (long long i = 1; i <= maxn; i += 2) {
    p[i] = 1;
  }
  for (long long i = 3; i <= maxn; i += 2) {
    if (p[i] == 1) {
      for (long long j = i * i; j <= maxn; j += i) {
        p[j] = 0;
      }
    }
  }
}
void solve() {
  long long n;
  cin >> n;
  build_primes(sqrt(n) + 1);
  long long primecnt = 0;
  long long ans = 1;
  if (n == 4) {
    cout << 2 << "\n";
    return;
  }
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0 && p[i]) {
      primecnt++;
      ans *= i;
    }
    if (primecnt == 2) break;
  }
  long long k = ans * ans;
  if (primecnt == 1 && k != n && n % k == 0) {
    cout << 1 << "\n";
    cout << k << "\n";
    return;
  }
  if (primecnt == 0) {
    cout << 1 << "\n";
    cout << 0 << "\n";
    return;
  }
  if (primecnt == 2) {
    cout << 1 << "\n";
    cout << ans << "\n";
  } else
    cout << 2 << "\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
