8587340257
 9
 81
 27
 1408514752349
 25
 49380563
 266418
 319757451841
 6599669076000
 8
 1000000000000
 30971726
 274875809788
 64
 34280152201
 236
 472670214391
 7938986881993
 44
 4
 388
 2
 802241960524
 3047527844089
 5
 12
 614125
 1716443237161
 48855707
 99
 9999925100701
 5839252225
 3
 50
 1307514188557
 9999926826034
 1468526771489
 2975
 8110708459517
 401120980262
 5138168457911
 1245373417369
 128
 16
 2000000014
 445538663413
 57461344602
 324
 7420738134810

1
9409 2 1
9 1
9 1
72361 2 1
289 1
6 1
289 1
4 1
4 1
4 2 1
4 1
4 2 1
4 1
23020027 1
378028993 1
4 2 1
4 1
0 1
4 2 1
0 1
4 1
25 1
5329 1
2603 1
9 1
0 1
25 1
0 1
10 1
39283 2 1
613783 1
25 2 2 2 1
908209 1
4 1
4 2 1
0 1
6 1
4 1
6
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
ifs = sys.stdin
ofs = sys.stdout

from math import sqrt


def primes_eratosthene_leq_simple(N):
    primes = [True]*(N+1)
    #print 'allocated'
    primes[0] = False
    primes[1] = False
    for i in range(2,int(sqrt(N))+1):
        if primes[i]:
            L = (N - i*i) // i  + 1
            primes[i*i:N+1:i] = [False] * L
    P = [n for n,prime in enumerate(primes) if prime]
    return P

def primes_eratosthene_leq_block(N, block_size):
    #print
    #print 'finding primes <=', N, 'with block size', block_size
    SQRT_N = int(sqrt(N))
    primes = primes_eratosthene_leq_simple(SQRT_N)
    #print 'generated primes <=',SQRT_N,'== sqrt(n)' 
    #print 'primes:',primes
    new_primes = []
    Nb,r = divmod(N-SQRT_N, block_size)
    if r>0:
        Nb += 1
    #print 'number of blocks:', Nb
    for ib in range(Nb):
        # calculation
        block = [True]*block_size
        block_beg = SQRT_N + ib*block_size
        #print 'block_beg:',block_beg
        for p in primes:
            beg = block_beg % p
            if beg > 0:
                beg = p - beg
            #print 'checking prime',p,'starting from',beg
            L = (block_size-1 - beg) // p + 1
            block[beg:block_size:p] = [False]*L
        # extraction
        for k in range(block_size):
            if block[k]:
                n = block_beg+k
                if n <= N:
                    new_primes.append(n)

    primes.extend(new_primes)
    return primes

def primes_eratosthene_leq(N):
    #return primes_simple_eratosthene_leq(N)
    block_size = 30 * 10**3
    if N <= block_size:
        return primes_eratosthene_leq_simple(N)
    else:
        return primes_eratosthene_leq_block(N, block_size)

def solve(N):
    NN = N
    P = primes_eratosthene_leq(int(sqrt(N)))
    #print P
    D = []
    for p in P:
        d,r = divmod(N,p)
        if r==0:
            D.append(p)
            N = d
        if len(D) > 2:
            break
    if N != NN:
        D.append(N)
    #print D
    
    if len(D) == 0:
        # N is prime
        return (1,0)
    elif len(D) == 2:
        # N = p1 * p2, where p1 and p2 are primes
        return (2,0)
    else:
        # N have more than 2 prime factors
        return (1,D[0]*D[1])


#import time
#beg = time.time()

N = int(ifs.readline())

player,move = solve(N)

ofs.write('%d\n' % (player))
if player == 1:
    ofs.write('%d\n' % (move))

#end = time.time()
#print( '[%s] time = %0.3f ms' % ('Overall',(end-beg)*1000.0) )
