In Omkar's last class of math, he learned about the least common multiple, or LCM. LCM(a, b) is the smallest positive integer x which is divisible by both a and b.

Omkar, having a laudably curious mind, immediately thought of a problem involving the LCM operation: given an integer n, find positive integers a and b such that a + b = n and LCM(a, b) is the minimum value possible.

Can you help Omkar solve his ludicrously challenging math problem?

Input

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

Each test case consists of a single integer n (2 ≤ n ≤ 10^{9}).

Output

For each test case, output two positive integers a and b, such that a + b = n and LCM(a, b) is the minimum possible.

Example

Input


3
4
6
9


Output


2 2
3 3
3 6

Note

For the first test case, the numbers we can choose are 1, 3 or 2, 2. LCM(1, 3) = 3 and LCM(2, 2) = 2, so we output 2 \ 2.

For the second test case, the numbers we can choose are 1, 5, 2, 4, or 3, 3. LCM(1, 5) = 5, LCM(2, 4) = 4, and LCM(3, 3) = 3, so we output 3 \ 3.

For the third test case, LCM(3, 6) = 6. It can be shown that there are no other pairs of numbers which sum to 9 that have a lower LCM.
import java.util.*;
import java.io.*;  

public class Solution{
    // public static class pair{
    //     int x;
    //     int y;
    // }
    public static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
        public String next() {
			while (st == null || !st.hasMoreElements())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		}public double nextDouble() {
			return Double.parseDouble(next());
		}
    }
    public static class pair{
        int x;
        int y;
        public pair(int a,int b){
            x=a;
            y=b;
        }
    }
    public static void main(String[] args) throws IOException{
        FastScanner fs=new FastScanner();
		int t=fs.nextInt();
		PrintWriter out=new PrintWriter(System.out);
		while(t-->0){
		    int n=fs.nextInt();
		    int ans=-1;
		    for(int i=2;i<=(int)Math.pow(n,0.5);i++){
		        if(n%i==0){
		            ans=i;
		            break;
		        }
		    }
		    int a=n/ans;
		    if(ans==-1){
		        System.out.println(1+" "+(int)(n-1));
		    }else{
		        System.out.println(a+" "+(int)(n-a));
		    }
		}
        out.close();
    }
    public static long get(int n,int k){
        long C[][] = new long[n+1][k+1]; 
        int i, j;
        for (i = 0; i <= n; i++) 
        { 
            for (j = 0; j <= Math.min(i, k); j++) 
            { 
            // Base Cases 
            if (j == 0 || j == i) 
                C[i][j] = (long)1; 
       
            // Calculate value using  
            // previously stored values 
            else
                C[i][j] = C[i-1][j-1] + C[i-1][j]; 
            } 
        } 
        return C[n][k];
    }
    public static int upp(int[] arr,int v){
        int low=0;
        int high=arr.length-1;
        int ans=-1;
        while(low<=high){
            int m=(low+high)/2;
            if(arr[m]<=v){
                ans=m;
                low=m+1;
            }else{
                high=m-1;
            }
        }
        return ans;
    }
    public static boolean distinct(int n){
        String s=n+"";
        HashSet<Character> set=new HashSet<>();
        for(int i=0;i<s.length();i++){
            if(set.contains(s.charAt(i))){
                return false;
            }
            set.add(s.charAt(i));
        }
        return true;
    }
    public static int sum(int n){
        String s=n+"";
        int ans=0;
        for(int i=0;i<s.length();i++){
            ans+=(s.charAt(i)-'0');
        }
        return ans;
    }
    public static boolean check(int n){
        String s=n+"";
        int ans=0;
        for(int i=0;i<s.length();i++){
            ans+=s.charAt(i)-'0';
        }
        if(ans==10){
            return true;
        }
        return false;
    }
    public static String calc(String s){
        if(s.length()==1){
            return s.charAt(0)+""+s.charAt(0);
        }
        int first=s.charAt(0)-'0';
        StringBuffer sb=new StringBuffer();
        String sh=s.substring(1);
        sb.append(first+calc(sh)+first);
        return sb.toString();
    }
    public static class Comp implements Comparator<pair>{
        public int compare(pair a,pair b){
            if(a.x!=b.x){
                return b.x-a.x;
            }else{
                return a.y-b.y;
            }
        }
    }
    public static long gcd(long a,long b){
        if (b == 0) 
        return a; 
        return gcd(b, a % b);
    }
    public static int lcm(int a,int b){
        int x=Math.max(a,b);
        int y=Math.min(a,b);
        long ans=x;
        while(ans%y!=0){
            ans+=x;
        }
        if(ans>Integer.MAX_VALUE){
            return -1;
        }
        return (int)ans;
    }
    public static long fact(int n){
        long ans=1;
        for(int i=1;i<=n;i++){
            ans*=i;
        }
        return ans;
    }
}