#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool read(T &x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c<'0' | c> '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
struct debugger {
  template <typename T>
  debugger &operator,(const T &v) {
    cerr << v << "    ";
    return *this;
  }
} dbg;
template <class T>
void __stl_print__(T &x) {
  cerr << "[";
  for (__typeof((x).end()) i = (x).begin(); i != (x).end(); ++i)
    cerr << (i != x.begin() ? ", " : "") << *i;
  cerr << "]" << endl;
}
template <class T, class U>
inline T max(T &a, U &b) {
  return a > b ? a : b;
}
template <class T, class U>
inline T min(T &a, U &b) {
  return a < b ? a : b;
}
template <class T, class U>
inline T swap(T &a, U &b) {
  T tmp = a;
  a = b;
  b = tmp;
}
const long long INF = (1ll) << 50;
const int mx = 1e5 + 7;
const int mod = 1000000007;
const double pi = 2 * acos(0.0);
int EQ(double d) {
  if (fabs(d) < 1e-7) return 0;
  return d > 1e-7 ? 1 : -1;
}
int main() {
  long long q = ({
    long long a;
    read(a);
    a;
  });
  long long p = q;
  if (q == 1) {
    cout << "1\n0\n";
  } else {
    long long sz = sqrt(q);
    long long a = -1, b = -1;
    for (__typeof(sz) i = (2); i <= (sz); ++i) {
      if (q % i == 0) {
        if (a == -1)
          a = i;
        else if (b == -1)
          b = i;
        int cnt = 0;
        while (q % i == 0) {
          q /= i;
          cnt++;
        }
        if (cnt > 1 && b == -1) b = i;
      }
      if (a == -1 || b == -1) continue;
      break;
    }
    if (q == p)
      cout << "1\n0\n" << endl;
    else if (a == -1 && b == -1)
      cout << 2 << endl;
    else {
      if (b == -1) b = q;
      long long tmp = b * a;
      if (tmp == p)
        cout << 2 << endl;
      else {
        cout << 1 << endl;
        cout << tmp << endl;
      }
    }
  }
}
