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 Main {

	// make it false if Multiple test case is not in the question
	static boolean multipleTC = true;
	int TestCase = 1;

	// for pre processing if needed
	void pre() throws Exception {
	}

	public static void main(String[] args) throws Exception {

		new Main().run();
	}

	static int hcf(int a, int b) {
		if (b == 0)
			return a;
		return hcf(b, a % b);
	}

	static int find(int a, int b) {
		return a * b / hcf(a, b);
	}

	// input output handled here
	private String solve() throws Exception {
		int n = ni();

		if ((n & 1) == 0)
			return n / 2 + " " + n / 2;
		int a = 0, b = 0;
		for (int i = 3; i * i <= n; i += 2) {
			if (n % i == 0) {
				a = n / i;
				break;
			}
		}
		if (a == 0) {
			a = 1;

		}
		b = n - a;

		// deb2(a, b);
		return (a) + " " + (b);
	}

	void run() throws Exception {
		// long start_time = System.nanoTime();

		try {
			in = new FastReader("in0.txt");
			out = new PrintWriter("out0.txt");
		} catch (Exception e) {
			in = new FastReader();
			out = new PrintWriter(System.out);
		}
		pre();
		StringBuilder print = new StringBuilder("");

		int T = (multipleTC) ? ni() : 1;
		for (int t = 1; t <= T; t++) {
			this.TestCase = t;
			print.append(solve()).append("\n");
		}

		p(print);
		// long end_time = System.nanoTime();
		// System.out.printf("Running Time in sec : %2.10f", (double) (end_time -
		// start_time) * (double) 1e-9);

		out.flush();
		out.close();
	}

	PrintWriter out;
	FastReader in;

	void p(Object o) {
		out.print(o);
	}

	void pln(Object o) {
		out.println(o);
	}

	void pnf(Object o) {
		out.println(o);
		out.flush();
	}

	String n() throws Exception {
		return in.readLine();
	}

	String nln() throws Exception {
		return in.readLine();
	}

	int ni() throws Exception {
		return (in.nextInt());
	}

	long nl() throws Exception {
		return in.nextLong();
	}

	double nd() throws Exception {
		return in.nextDouble();
	}

	void deb(Object x) {
		System.out.println("#" + TestCase + " = " + x);
	}

	void deb2(Object x, Object y) {
		System.out.println("#" + TestCase + " = " + x + " , " + y);
	}

	static class FastReader {
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public FastReader() {
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public FastReader(String file_name) throws IOException {
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException {
			byte[] buf = new byte[64]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1) {
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException {
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException {
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException {
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (c == '.') {
				while ((c = read()) >= '0' && c <= '9') {
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException {
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException {
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException {
			if (din == null)
				return;
			din.close();
		}
	}
}