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.io.*; 
import java.util.*; 
public class Main{
	static PrintWriter pp = new PrintWriter((System.out));
	public static void main(String[] args) throws IOException {
		in sc = new in();  
		int t = sc.iin(); 
		while(t-- > 0){
		    long n = sc.lin(); 
		    String ans = ""; 
		    if(n%2 == 0){
		        ans += Long.toString(n/2) + " " + Long.toString(n/2); 
		    }
		    else{
		        long x = find(n);
		        if(x == -1)
		        ans += Long.toString(1) + " " + Long.toString(n-1); 
		        else{
		            ans += Long.toString(x) + " " + Long.toString(n-x); 
		        }
		    }
		    pp.println(ans); 
		}
		pp.close(); 
	}
	public static long find(long n) throws IOException {
	    long l = 1, r = n-1; 
	    long ans = -1; 
	    for(int i = 2; i * i <= n; i++){
	        if(n%i == 0){
	            ans  = n/i; 
	            return ans; 
	        }
	    }
	    return ans; 
	}
	public static String id(String s, int i){
		return Character.toString(s.charAt(i)); 
	}
}
class in{
	ReaderClass sc = new ReaderClass(System.in);
	public int iin() throws IOException{
		int a = sc.nextInt(); 
		return a; 
	}
	public long lin() throws IOException{
		long a = sc.nextLong(); 
		return a; 
	}
	public double din() throws IOException{
		double a = sc.nextDouble(); 
		return a; 
	}
	public String sin() throws IOException{
		String a = sc.next(); 
		return a; 
	}

	public int[] iin(int n) throws IOException{
		int a[] = new int[n]; 
		for(int i = 0; i< n; i++){
			a[i] = sc.nextInt(); 
		}
		return a; 
	}
	public long[] lin(int n) throws IOException{
		long a[] = new long[n]; 
		for(int i = 0; i< n; i++){
			a[i] = sc.nextLong(); 
		}
		return a;
	}
	public char[] scin() throws IOException{
		String s = sc.next(); 
		char[] a = s.toCharArray(); 
		return a; 
	}
	public double[] din(int n) throws IOException{
		double a[] = new double[n]; 
		for(int i = 0; i< n; i++){
			a[i] = sc.nextDouble(); 
		}
		return a; 
	}
	public String[] sin(int n) throws IOException{
		String a[] = new String[n]; 
		for(int i = 0; i< n; i++){
			a[i] = sc.next(); 
		}
		return a; 
	}
	public ArrayList<Integer>  iinlist(int n) throws IOException{
		ArrayList<Integer> a = new ArrayList<>(); 
		for(int i = 0; i < n; i++){
			a.add(sc.nextInt()); 
		}
		return a; 
	}
	public ArrayList<Long>  linlist(int n) throws IOException{
		ArrayList<Long> a = new ArrayList<>(); 
		for(int i = 0; i < n; i++){
			a.add(sc.nextLong()); 
		}
		return a; 
	}
	public ArrayList<String>  sinlist(int n) throws IOException{
		ArrayList<String> a = new ArrayList<>(); 
		for(int i = 0; i < n; i++){
			a.add(sc.next()); 
		}
		return a; 
	}
	public ArrayList<Character> cinnlist(int n) throws IOException{
		ArrayList<Character> a = new ArrayList<>(); 
		String s = sc.next();
		for(int i = 0; i < n; i++){
			a.add(s.charAt(i)); 
		} 
		return a; 
	}
	public ArrayList<Double> dinlist(int n) throws IOException{
		ArrayList<Double> a = new ArrayList<>(); 
		for(int i = 0; i < n; i++){
			a.add(sc.nextDouble()); 
		}
		return a; 
	}
}
class ReaderClass {
	    static BufferedReader reader;
	    static StringTokenizer tokenizer;

	    /** call this method to initialize reader for InputStream */
	   public ReaderClass(InputStream input) {
	        reader = new BufferedReader(
	                     new InputStreamReader(input) );
	        tokenizer = new StringTokenizer("");
	    }

	    /** get next word */
	    public String next() throws IOException {
	        while ( ! tokenizer.hasMoreTokens() ) {
	            tokenizer = new StringTokenizer(
	                   reader.readLine() );
	        }
	        return tokenizer.nextToken();
	    }

	    public int nextInt() throws IOException {
	        return Integer.parseInt( next() );
	    }
		
	    public double nextDouble() throws IOException {
	        return Double.parseDouble( next() );
	    }
	    public long nextLong() throws IOException{
	    	return Long.parseLong(next());
	    }
	    public String nextLine() throws IOException{
	    	return reader.readLine();
	    }
}
class str{
	
}
