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.
#include <bits/stdc++.h>
using namespace std;
vector<bool> prime;
vector<long long> fact, inv, primes, factors, pf;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void factorize(long long a) {
  factors.clear();
  for (long long i = 1; i * i <= a; i++) {
    if (i * i == a)
      factors.push_back(i);
    else if (a % i == 0) {
      factors.push_back(i);
      factors.push_back(a / i);
    }
  }
  sort(factors.begin(), factors.end());
}
long long power(long long a, long long b) {
  if (a == 1 || b == 0) return 1;
  long long c = power(a, b / 2);
  long long res = 1;
  res = c * c;
  if (res >= 998244353) res %= 998244353;
  if (b % 2) res *= a;
  if (res >= 998244353) res %= 998244353;
  return res;
}
long long modInv(int a) { return power(a, 998244353 - 2); }
void factorial(long long n) {
  fact.resize(n + 1);
  fact[0] = 1;
  for (long long i = 1; i <= n; i++) {
    fact[i] = fact[i - 1] * i;
    if (fact[i] >= 998244353) fact[i] %= 998244353;
  }
}
void InvFactorial(long long n) {
  inv.resize(n + 1);
  inv[0] = 1;
  for (long long i = 1; i <= n; i++) inv[i] = modInv(fact[i]);
}
long long ncr(long long n, long long r) {
  if (n < r || n < 0 || r < 0) return 0;
  long long b = inv[n - r];
  long long c = inv[r];
  long long a = fact[n] * b;
  if (a >= 998244353) a %= 998244353;
  a *= c;
  if (a >= 998244353) a %= 998244353;
  return a;
}
void remove_duplicates(vector<pair<long long, long long> > &v) {
  sort(v.begin(), v.end());
  long long _size = unique(v.begin(), v.end()) - v.begin();
  v.resize(_size);
}
unsigned long long gcd(unsigned long long u, unsigned long long v) {
  if (u == 0 || v == 0) return max(u, v);
  unsigned long long shift = __builtin_ctz(u | v);
  u >>= __builtin_ctz(u);
  do {
    v >>= __builtin_ctz(v);
    if (u > v) swap(u, v);
    v -= u;
  } while (v != 0);
  return u << shift;
}
void sieve(long long n) {
  prime.assign(n + 1, 1);
  prime[1] = false;
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p]) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long i = 2; i < n + 1; i++) {
    if (prime[i]) primes.push_back(i);
  }
}
void prime_sieve(long long n) {
  pf.assign(n + 1, 0);
  for (long long i = 0; i < n + 1; i++) pf[i] = i;
  for (long long i = 2; i <= n; i++) {
    if (pf[i] == i) {
      for (long long j = i; j <= n; j += i) pf[j] = i;
    }
  }
}
long long size(long long l) {
  long long p = l;
  long long count = 0;
  while (p) p /= 10, count++;
  return count;
}
void solve() {
  long long n;
  cin >> n;
  for (auto &i : primes) {
    if (n % i == 0) {
      cout << n / i << ' ' << n - n / i << '\n';
      return;
    }
  }
  cout << n - 1 << ' ' << 1 << '\n';
}
int main() {
  fast();
  sieve(100005);
  long long T = 1;
  cin >> T;
  for (long long z = 1; z <= T; z++) solve();
}
