#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long n);
void fast();
void clk();
long long fact(long long n);
long long nCr(long long n, long long r);
long long gcd(long long a, long long b);
long long expo(long long a, long long b, long long m);
long long mod_add(long long a, long long b, long long m);
long long mod_mul(long long a, long long b, long long m);
long long mod_sub(long long a, long long b, long long m);
long long lcm(long long a, long long b);
long long msbof(long long n);
bool isPrime(long long n);
void primeFactors(long long n);
bool isPowerOfTwo(long long n);
long long cnty = 0;
void solve(long long testcase) {
  long long n;
  cin >> n;
  cout << 2 << " " << n - 1 << "\n";
}
long long t = 1;
int main() {
  fast();
  cin >> t;
  while (t--) {
    solve(t);
  }
  return 0;
}
void clk() {
  clock_t time = clock();
  solve(t);
  time = clock() - time;
  cout << "time=" << (float)time / CLOCKS_PER_SEC << endl;
}
void fast() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
bool isPowerOfTwo(long long n) {
  if (n == 0) return false;
  return (ceil(log2(n)) == floor(log2(n)));
}
long long nCr(long long n, long long r) {
  return fact(n) / (fact(r) * fact(n - r));
}
long long fact(long long n) {
  long long res = 1;
  for (long long i = 2; i <= n; i++) res = res * i;
  return res;
}
long long gcd(long long a, long long b) {
  if (b > a) {
    return gcd(b, a);
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long expo(long long a, long long b, long long m) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % 1000000007;
    a = (a * a) % 1000000007;
    b = b >> 1;
  }
  return res;
}
long long mod_add(long long a, long long b, long long m) {
  a = a % m;
  b = b % m;
  return (((a + b) % m) + m) % m;
}
long long mod_mul(long long a, long long b, long long m) {
  a = a % m;
  b = b % m;
  return (((a * b) % m) + m) % m;
}
long long mod_sub(long long a, long long b, long long m) {
  a = a % m;
  b = b % m;
  return (((a - b) % m) + m) % m;
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long msbof(long long n) {
  if (n == 0) return 0;
  long long msb = 0;
  n = n / 2;
  while (n != 0) {
    n = n / 2;
    msb++;
  }
  return (1 << msb);
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}

### Prompt

Your challenge is to write a Cpp solution to the following problem:

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.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long n);
void fast();
void clk();
long long fact(long long n);
long long nCr(long long n, long long r);
long long gcd(long long a, long long b);
long long expo(long long a, long long b, long long m);
long long mod_add(long long a, long long b, long long m);
long long mod_mul(long long a, long long b, long long m);
long long mod_sub(long long a, long long b, long long m);
long long lcm(long long a, long long b);
long long msbof(long long n);
bool isPrime(long long n);
void primeFactors(long long n);
bool isPowerOfTwo(long long n);
long long cnty = 0;
void solve(long long testcase) {
  long long n;
  cin >> n;
  cout << 2 << " " << n - 1 << "\n";
}
long long t = 1;
int main() {
  fast();
  cin >> t;
  while (t--) {
    solve(t);
  }
  return 0;
}
void clk() {
  clock_t time = clock();
  solve(t);
  time = clock() - time;
  cout << "time=" << (float)time / CLOCKS_PER_SEC << endl;
}
void fast() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
bool isPowerOfTwo(long long n) {
  if (n == 0) return false;
  return (ceil(log2(n)) == floor(log2(n)));
}
long long nCr(long long n, long long r) {
  return fact(n) / (fact(r) * fact(n - r));
}
long long fact(long long n) {
  long long res = 1;
  for (long long i = 2; i <= n; i++) res = res * i;
  return res;
}
long long gcd(long long a, long long b) {
  if (b > a) {
    return gcd(b, a);
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
long long expo(long long a, long long b, long long m) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % 1000000007;
    a = (a * a) % 1000000007;
    b = b >> 1;
  }
  return res;
}
long long mod_add(long long a, long long b, long long m) {
  a = a % m;
  b = b % m;
  return (((a + b) % m) + m) % m;
}
long long mod_mul(long long a, long long b, long long m) {
  a = a % m;
  b = b % m;
  return (((a * b) % m) + m) % m;
}
long long mod_sub(long long a, long long b, long long m) {
  a = a % m;
  b = b % m;
  return (((a - b) % m) + m) % m;
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long msbof(long long n) {
  if (n == 0) return 0;
  long long msb = 0;
  n = n / 2;
  while (n != 0) {
    n = n / 2;
    msb++;
  }
  return (1 << msb);
}
bool isPrime(long long n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}

```