Gregor is learning about RSA cryptography, and although he doesn't understand how RSA works, he is now fascinated with prime numbers and factoring them.

Gregor's favorite prime number is P. Gregor wants to find two bases of P. Formally, Gregor is looking for two integers a and b which satisfy both of the following properties.

  * P mod a = P mod b, where x mod y denotes the remainder when x is divided by y, and 
  * 2 ≤ a < b ≤ P. 



Help Gregor find two bases of his favorite prime number!

Input

Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 1000).

Each subsequent line contains the integer P (5 ≤ P ≤ {10}^9), with P guaranteed to be prime.

Output

Your output should consist of t lines. Each line should consist of two integers a and b (2 ≤ a < b ≤ P). If there are multiple possible solutions, print any.

Example

Input


2
17
5


Output


3 5
2 4

Note

The first query is P=17. a=3 and b=5 are valid bases in this case, because 17 mod 3 = 17 mod 5 = 2. There are other pairs which work as well.

In the second query, with P=5, the only solution is a=2 and b=4.
2
17
5
 1
55439
 5
5
7
11
13
19

2 16
2 4
 2 55438
 2 4
2 6
2 10
2 12
2 18

import java.io.*;
import java.util.*;

public class primemod {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(
                new InputStreamReader(System.in));
        }
        public FastReader(String file_name)throws IOException
        {
            br = new BufferedReader(
                new FileReader(file_name));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() { return Integer.parseInt(next()); }

        long nextLong() { return Long.parseLong(next()); }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        
        public int[] nextArray(int n){
            int ar[] = new int[n];
            for(int i=0;i<n;i++)
                ar[i] = this.nextInt();
            return (ar);
        }
    }

   static class OutputWriter{
        BufferedWriter writer;

         public OutputWriter(OutputStream stream){
           writer = new BufferedWriter(new OutputStreamWriter(stream));
         }

         public OutputWriter(String file_name) throws IOException{
           writer = new BufferedWriter(new FileWriter("output.txt"));
         }
       
         public void print(int i) throws IOException {
           writer.write(i);
         }

         public void print(String s) throws IOException {
            writer.write(s);
          }

         public void print(char []c) throws IOException {
            writer.write(c);
         }

         public void println(int i) throws IOException {
           writer.write(i+"\n");
         }

         public void println(long i) throws IOException {
           writer.write(i+"\n");
         }

         public void println(String s) throws IOException {
            writer.write(s+"\n");
          }

         public void println(char []c) throws IOException {
            writer.write(c+"\n");
         }

         public  void close() throws IOException {
            writer.close();
         }

    }
    public static long gcd(long a,long b){
        return(a==0?b:gcd(b%a,a));
    }
    public static long lcm(long a,long b){
        //return (a*b)/gcd(a,b);
        //this is modified to avoid integer overflow by multiplying a*b
        return((a/gcd(a,b))*b);
    }
    public static void initialize_io_redirection()throws IOException{
        try{
            boolean MP = System.getProperty("MY_PC")!=null;
            if(MP){
                fs = new FastReader("input.txt");
                op = new OutputWriter("output.txt");
                System.setOut(new PrintStream(new File("output.txt")));
            }
            else{
                fs = new FastReader();
                op = new OutputWriter(System.out);
            }
       }
       catch(Exception e){
            fs = new FastReader();
            op = new OutputWriter(System.out);
       }
    }
   static FastReader fs;
   static OutputWriter op;
    public static void main(String[] args)throws IOException{
        initialize_io_redirection();
        int t = fs.nextInt();
        while(t-- > 0)
            solve();
        op.close();
    }

    public static void solve()throws IOException{
        long p=fs.nextLong();
        System.out.println(2+" "+(p/2)*2);
    }
}

