#include <bits/stdc++.h>
using namespace std;
const int MAX = 5 + 4e6;
bool isPrime[MAX];
vector<int> primes;
void sieve(int n = MAX - 5) {
  memset(isPrime, 1, sizeof isPrime);
  isPrime[0] = isPrime[1] = 0;
  for (int i = 2; i * i <= n; i++) {
    if (isPrime[i]) {
      for (int j = i * i; j <= n; j += i) isPrime[j] = 0;
    }
  }
  for (int i = 0; i <= n; i++)
    if (isPrime[i]) primes.push_back(i);
}
int main() {
  sieve();
  ios::sync_with_stdio(0);
  long long n, n1, ans = 1, k = 0, i;
  cin >> n;
  n1 = n;
  for (i = 0; i < primes.size(); ++i) {
    if (n % primes[i] == 0) {
      ++k;
      n /= primes[i];
      ans *= primes[i];
    }
    if (k == 2) break;
    if (n % primes[i] == 0) {
      ++k;
      n /= primes[i];
      ans *= primes[i];
    }
    if (k == 2) break;
  }
  if (k == 1 && n != 1) {
    ++k;
    ans = n1;
  }
  if (k < 2 || n1 == 1)
    cout << "1\n0";
  else {
    if (ans == n1)
      cout << "2\n";
    else
      cout << "1\n" << ans << "\n";
  }
}
