#include <bits/stdc++.h>
using namespace std;
int t = 0;
int ans = 1;
long long int prime(long long int n) {
  while (n % 2 == 0) {
    if (t == 2) break;
    n = n / 2;
    t++;
    ans *= 2;
  }
  for (int i = 3; i <= sqrt(n); i += 2) {
    while (n % i == 0) {
      if (t == 2) break;
      n = n / i;
      t++;
      ans *= i;
    }
    if (t == 2) break;
  }
  if (n > 2 && t != 2) {
    ans *= n;
    t++;
    n = 1;
  }
  return n;
}
int main() {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  long long int n;
  cin >> n;
  if (n == 1)
    cout << 1 << "\n" << 0;
  else {
    long long int final = prime(n);
    if (final == 1 && t == 1)
      cout << 1 << endl << 0;
    else if (final == 1 && t == 2)
      cout << 2;
    else if (t == 2)
      cout << 1 << "\n" << ans;
  }
  return 0;
}
