You can't possibly imagine how cold our friends are this winter in Nvodsk! Two of them play the following game to warm up: initially a piece of paper has an integer q. During a move a player should write any integer number that is a non-trivial divisor of the last written number. Then he should run this number of circles around the hotel. Let us remind you that a number's divisor is called non-trivial if it is different from one and from the divided number itself. 

The first person who can't make a move wins as he continues to lie in his warm bed under three blankets while the other one keeps running. Determine which player wins considering that both players play optimally. If the first player wins, print any winning first move.

Input

The first line contains the only integer q (1 ≤ q ≤ 1013).

Please do not use the %lld specificator to read or write 64-bit integers in С++. It is preferred to use the cin, cout streams or the %I64d specificator.

Output

In the first line print the number of the winning player (1 or 2). If the first player wins then the second line should contain another integer — his first move (if the first player can't even make the first move, print 0). If there are multiple solutions, print any of them.

Examples

Input

6


Output

2


Input

30


Output

1
6


Input

1


Output

1
0

Note

Number 6 has only two non-trivial divisors: 2 and 3. It is impossible to make a move after the numbers 2 and 3 are written, so both of them are winning, thus, number 6 is the losing number. A player can make a move and write number 6 after number 30; 6, as we know, is a losing number. Thus, this move will bring us the victory.
import java.util.*;
    import java.io.*;
 
     public class CodeForces {
        
        
        public static void main(String[] args) throws IOException {
            Reader.init(System.in);
            PrintWriter writer = new PrintWriter(System.out);

            long x = Reader.nextLong();
            if(isP(x) || x == 1){
                System.out.println(1 + "\n" + 0);
                return;
            }
            
            
            long ans = (long) 1e18;
            for (long i = 2; i*i <= x; i++) {
                if(x % i == 0){
                    
                    if(check(i)){
                        ans = i;
                        break;
                    }
                    
                    
                    else if(check(x/i)){
                        ans = Math.min(ans, (x/i));
                    }
                }
            }
            
            if(ans == (long)1e18)
                writer.println(2);
            else
                writer.println(1 + "\n" + ans);
            
            writer.close();
        }
        
        static boolean isP(long n){
            if(n <= 1)
                return false;
            if(n == 2)
                return true;
            if(n % 2 == 0)
                return false;
            
            for (long i = 3; i*i <= n; i += 2) {
                if(n % i == 0)
                    return false;
            }
            
            return true;
        }
        
        static boolean check(long x){
            for (long i = 2; i * i <= x; i++) {
                if(x % i == 0){
                    if(!isP(i) || !isP(x/i))
                        return false;
                }
            }
            
            return !isP(x);
        }
    }
    
    class  Edge implements Comparable<Edge>{
 
        int to;
        int from;
        int cost;
        
        Edge(int a, int b, int c){
            from = a;
            to = b;
            cost = c;
        }
 
        @Override
        public int compareTo(Edge t) {
            return t.cost - cost;
        }
    }
 
 
class Point{
    double x, y;

    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }
        
            
    public Point clone(){
        return new Point(x, y);
    }
    

    public void rotate(Point org, int th){
        this.x -= org.x;
        this.y -= org.y;

        double c = (int)Math.cos(Math.toRadians(th));
        double s = (int)Math.sin(Math.toRadians(th));

        double newX = this.x * c - this.y * s;
        double newY = this.x * s + this.y * c;

        this.x = newX + org.x;
        this.y = newY + org.y;
    }

    @Override
    public String toString() {
        return this.x + ", " + this.y;
    }
    
    
}
 
 
    class Reader {
 
        static BufferedReader reader;
        static StringTokenizer tokenizer;
 
        public static int pars(String x) {
            int num = 0;
            int i = 0;
            if (x.charAt(0) == '-') {
                i = 1;
            }
            for (; i < x.length(); i++) {
                num = num * 10 + (x.charAt(i) - '0');
            }
 
            if (x.charAt(0) == '-') {
                return -num;
            }
 
            return num;
        }
 
        static void init(InputStream input) {
            reader = new BufferedReader(
                    new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }
 
        static void init(FileReader input) {
            reader = new BufferedReader(input);
            tokenizer = new StringTokenizer("");
        }
 
        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(
                        reader.readLine());
            }
            return tokenizer.nextToken();
        }
 
        static int nextInt() throws IOException {
            return pars(next());
        }
 
        static long nextLong() throws IOException {
            return Long.parseLong(next());
        }
 
        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
    }