#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<bool> a(10000003, 0);
  a[0] = a[1] = 1;
  for (unsigned long long i = 2; i <= 10000000; ++i) {
    if (!a[i]) {
      for (unsigned long long j = i + i; j <= 10000000; j += i) {
        a[j] = 1;
      }
    }
  }
  unsigned long long q;
  cin >> q;
  unsigned long long lmt, ans = 1, cnt = 0;
  bool flag = 0;
  lmt = 1e7;
  unsigned long long sz = min(q, lmt);
  unsigned long long oq = q;
  for (unsigned long long i = 2; i < sz; ++i) {
    if (q % i == 0 && (!a[i])) {
      unsigned long long cntx = 0;
      while (q % i == 0) {
        q = q / i;
        ++cntx;
      }
      if (cntx >= 2) {
        ans = i * i;
        cnt = 2;
      } else {
        ans *= i;
        ++cnt;
      }
    }
    if (cnt == 2) {
      flag = 1;
      break;
    }
    if (q == 1) {
      break;
    }
  }
  q = oq;
  if (flag) {
    if (ans != q) {
      cout << "1\n" << ans << "\n";
      return 0;
    } else {
      cout << "2\n";
      return 0;
    }
  }
  if (!cnt) {
    cout << "1\n0\n";
    return 0;
  }
  cout << "2\n";
  return 0;
}
