#include <bits/stdc++.h>
using namespace std;
int dx[] = {-1, 1, 0, 0, -1, -1, 1, 1};
int dy[] = {0, 0, 1, -1, -1, 1, -1, 1};
map<int, bool> ans;
map<long long, int> dp;
int rec(long long q) {
  if (ans[q] == 1) return dp[q];
  vector<int> v;
  long long sq = sqrt(q);
  int mex, x;
  for (int l = 2; l < sq + 1; l++) {
    if (!(q % l)) {
      x = rec(l);
      v.push_back(x);
      x = rec(q / l);
      v.push_back(x);
    }
  }
  if (v.size() == 0)
    mex = 1;
  else {
    sort(v.begin(), v.end());
    (v).erase(unique((v).begin(), (v).end()), (v).end());
    int len = v.size();
    mex = 0;
    for (int l = 0; l < len; l++) {
      if (v[l] != mex) break;
      mex++;
    }
  }
  ans[q] = 1;
  return dp[q] = mex;
}
bool chq(long long q) {
  long long sq = sqrt(q);
  for (int l = 2; l < sq + 1; l++) {
    if (!(q % l)) return 0;
  }
  return 1;
}
long long go(long long q) {
  long long sq = sqrt(q);
  int x;
  for (int l = 2; l < sq + 1; l++) {
    if (!(q % l)) {
      x = dp[l];
      if (!x) return l;
      x = dp[q / l];
      if (!x) return q / l;
    }
  }
}
int main() {
  int t, z = 0, len;
  long long n, k = 0, m = 0;
  scanf("%lld", &n);
  bool prime = chq(n);
  if (prime) {
    printf("1\n");
    printf("0\n");
    return 0;
  }
  k = rec(n);
  if (!k)
    printf("2\n");
  else {
    printf("1\n");
    m = go(n);
    printf("%lld", m);
    printf("\n");
  }
  return 0;
}
