#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
map<long long, long long> mp;
bool prime[((long long)1e7 + 5)];
long long n;
void setup() {
  for (long long i = 2; i < ((long long)1e7 + 5); ++i) prime[i] = true;
  prime[1] = false;
  for (long long i = 2; i < ((long long)1e7 + 5); ++i)
    if (prime[i]) {
      for (long long j = 2 * i; j < ((long long)1e7 + 5); j += i)
        prime[j] = false;
    }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  long long sv = n;
  setup();
  for (long long i = 2; i * i <= n; ++i) {
    if (prime[i]) {
      while (n % i == 0) {
        mp[i]++;
        n /= i;
      }
    }
  }
  if (n > 1) mp[n]++;
  bool isprime = false;
  if (n == sv) isprime = true;
  long long total = 0;
  for (auto i : mp) total += i.second;
  if (total > 2) {
    long long remain = 1;
    long long t = 0;
    cout << 1 << "\n";
    for (long long i = 2; i * i <= sv && t < 2; ++i)
      if (prime[i] && sv % i == 0) {
        remain *= i;
        ++t;
        sv /= i;
        i--;
      }
    cout << remain << "\n";
  } else if (isprime)
    cout << "1\n0\n";
  else {
    cout << 2 << "\n";
  }
}
