#include <bits/stdc++.h>
using namespace std;
long long divisors[10000001];
bool isPrime(long long x) {
  for (long long i = 2; i * i <= x; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
int main() {
  long long q;
  cin >> q;
  if (q == 1 || q == 2) {
    cout << 1 << endl;
    cout << 0;
    return 0;
  }
  int flag = 0;
  long long tmp = q;
  for (long long i = 2; i * i <= q; i++) {
    while (q % i == 0) {
      divisors[flag++] = i;
      q /= i;
    }
  }
  if (q != 1 && q != tmp) {
    divisors[flag++] = q;
  }
  if (flag == 0) {
    cout << 1 << endl;
    cout << 0;
  } else {
    if (flag == 2) {
      cout << 2;
    } else {
      cout << 1 << endl;
      cout << divisors[0] * divisors[1];
    }
  }
  return 0;
}
