#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 7, NS = 2e3 + 7, lg = 20, sq = 550, inf = 1e9 + 7,
                mod = 1e9 + 7;
const long double eps = 1e-9;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  vector<long long> div;
  long long q, x, d = 1;
  cin >> q;
  if (q == 1) {
    cout << 1 << '\n' << 0;
    return 0;
  }
  x = q;
  while (d * d <= x) {
    d++;
    if (x % d) continue;
    div.push_back(d);
    while (x % d == 0) {
      x /= d;
    }
  }
  if (x != 1) {
    div.push_back(x);
  }
  if (div.size() >= 2) {
    long long y = div[0] * div[1];
    if (q != y) {
      cout << 1 << '\n' << y;
      return 0;
    }
    cout << 2;
    return 0;
  }
  if (div[0] == q)
    cout << 1 << '\n' << 0;
  else {
    if (div[0] * div[0] == q)
      cout << 2 << '\n';
    else
      cout << 1 << '\n' << div[0] * div[0];
  }
}
