Let's assume that 

  * v(n) is the largest prime number, that does not exceed n;
  * u(n) is the smallest prime number strictly greater than n. 



Find <image>.

Input

The first line contains integer t (1 ≤ t ≤ 500) — the number of testscases. 

Each of the following t lines of the input contains integer n (2 ≤ n ≤ 109).

Output

Print t lines: the i-th of them must contain the answer to the i-th test as an irreducible fraction "p/q", where p, q are integers, q > 0.

Examples

Input

2
2
3


Output

1/6
7/30
#include <bits/stdc++.h>
using namespace std;
long long n;
bool isPrime(long long k) {
  if (k == 2) return 1;
  if (k == 1 || k == 0 || k % 2 == 0) return 0;
  for (long long i = 3; i <= sqrt(k); i += 2)
    if (k % i == 0) return 0;
  return 1;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    cin >> n;
    long long p, q;
    for (long long i = n + 1;; i++)
      if (isPrime(i) == 1) {
        q = i;
        break;
      }
    for (long long i = n;; i--)
      if (isPrime(i) == 1) {
        p = i;
        break;
      }
    long long a = p * q - 2 * p - 2 * q + 2 * (n + 1);
    long long b = 2 * q * p;
    if (a % q == 0) a /= q, b /= q;
    if (a % p == 0) a /= p, b /= p;
    cout << a << "/" << b << endl;
  }
}
