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
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class C
{
	String line;
	StringTokenizer inputParser;
	BufferedReader is;
	FileInputStream fstream;
	DataInputStream in;
	String FInput="";
	
	
	void openInput(String file)
	{

		if(file==null)is = new BufferedReader(new InputStreamReader(System.in));//stdin
		else
		{
			try{
		
				
			fstream = new FileInputStream(file);
			in = new DataInputStream(fstream);
			is = new BufferedReader(new InputStreamReader(in));
			}catch(Exception e)
			{
				System.err.println(e);
			}
		}

	}
	
	void readNextLine()
	{
		try {
			line = is.readLine();
			inputParser = new StringTokenizer(line, " ");
			//System.err.println("Input: " + line);
		} catch (IOException e) {
			System.err.println("Unexpected IO ERROR: " + e);
		}	
		
	}
	
	int NextInt()
	{
		String n = inputParser.nextToken();
		int val = Integer.parseInt(n);
		
		//System.out.println("I read this number: " + val);
		return val;
	}
	
	String NextString()
	{
		String n = inputParser.nextToken();
		return n;
	}
	
	void closeInput()
	{
		try {
			is.close();
		} catch (IOException e) {
			System.err.println("Unexpected IO ERROR: " + e);
		}
			
	}
	
	public void readFInput()
	{
		for(;;)
		{
			try
			{
				readNextLine();
				FInput+=line+" ";
			}
			catch(Exception e)
			{
				break;
			}
		}
		inputParser = new StringTokenizer(FInput, " ");
	}
	
	long NextLong()
    {
            String n = inputParser.nextToken();
            
            long val = Long.parseLong(n);
            
            return val;
    }
	
	public static void main(String [] argv)
	{
		String filePath=null;
		if(argv.length>0)filePath=argv[0];
		new C(filePath);
	}
	
	public C(String inputFile)
	{
		openInput(inputFile);
    	readNextLine();
    	long n=NextLong();
    	int M=3162278;
    	M=6162278;
    	BigInteger b = new BigInteger(""+n);
    	if(b.isProbablePrime(100000)||n<2)
    	{
    		System.out.println(1);
    		System.out.println(0);
    		return;
    	}
    	
    	boolean [] p = new boolean [M];
    	
    	for(int i=0; i<M; i++)p[i]=true;
    	
    	long ret=0;
    	ArrayList <Long> pa = new ArrayList<Long>();
    	for(int i=2; i<M; i++)
    		if(p[i])
    		{
    			if(n%i==0)
    			{
    				pa.add((long)i);
    				long z=n/i;
    				if(z>i&&z%i==0)pa.add((long)i);
    				else
    				{
    					BigInteger zb = new BigInteger(""+z);
    			    	if(zb.isProbablePrime(100000))
    			    	{
    			    		pa.add(z);
    			    	}
    				}
    			}
    			if(pa.size()>1)break;
    			for(int j=i+2; j<M; j+=i)p[j]=false;
    			
    		}
    		
    	if(pa.size()>1)
    	{
    		ret=pa.get(0)*pa.get(1);
    		if(ret==n)ret=0;
    	}
    	
    	
    	
    	/*boolean [] p2 = new boolean [M];
    	int ret=0;
    	for(int i=2; i<M; i++)
    		if(p[i])for(int j=2; j<M; j++)
    			if(p[j])
    			{
    				if(n%(i*j)==0)
    				{
    					ret=i*j;
    				}
    			}*/
    	
    	if(ret==0)
    	{
    		System.out.println(2);
    		return;
    	}
    	
    	System.out.println(1);
    	System.out.println(ret);
		
		closeInput();	
	}

}

