#include <bits/stdc++.h>
using namespace std;
int dir1[8] = {1, -1, 0, 0, -1, 1, -1, 1};
int dir2[8] = {0, 0, -1, 1, -1, 1, 1, -1};
long long MAX = 1000000007;
vector<long long> prime(1001);
vector<long long> getprm;
long long power(long long a, long long b) {
  if (b == 0) return 1;
  auto q = power(a, b / 2);
  q = (q * q) % MAX;
  if (b % 2 == 0)
    return q % MAX;
  else
    return (q * a) % MAX;
}
long long modinv(long long val) { return power(val, MAX - 2); }
void primecalc() {
  fill(prime.begin(), prime.end(), 1);
  prime[0] = 0;
  prime[1] = 0;
  for (int i = 2; i <= 1000; i++) {
    if (prime[i]) {
      getprm.push_back(i);
      for (int j = i + i; j <= 1000; j += i) prime[j] = 0;
    }
  }
}
bool isprime(long long num) {
  for (int i = 2; i <= sqrt(num); i++) {
    if (num % i == 0) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n;
  cin >> n;
  if (isprime(n)) return cout << 1 << "\n" << 0, 0;
  set<long long> s;
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      s.insert(i);
      s.insert(n / i);
    }
  }
  for (auto i : s) {
    if (!isprime(i)) return cout << 1 << "\n" << i, 0;
  }
  return cout << 2, 0;
}
