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;
int f[100000], v[20000], k, t, n, q, ok, i, j;
unsigned long long x, y, z, w, sol1, sol2, r, st, dr;
unsigned long long cmmdc(unsigned long long a, unsigned long long b) {
  while (b) {
    unsigned long long r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int main() {
  for (i = 2; i <= 35000; i++)
    if (f[i] == 0) {
      v[++k] = i;
      for (j = 2 * i; j <= 35000; j += i) f[j] = 1;
    }
  cin >> t;
  for (q = 1; q <= t; q++) {
    cin >> n;
    for (i = n;; i--) {
      ok = 1;
      for (j = 1; 1LL * v[j] * v[j] <= i && j <= k; j++)
        if (i % v[j] == 0) ok = 0;
      if (ok) {
        st = i;
        break;
      }
    }
    for (i = n + 1;; i++) {
      ok = 1;
      for (j = 1; 1LL * v[j] * v[j] <= i && j <= k; j++)
        if (i % v[j] == 0) ok = 0;
      if (ok) {
        dr = i;
        break;
      }
    }
    x = 1LL * 2 * st;
    y = 0LL + st - 2;
    z = 1LL * st * dr;
    w = 0LL + n - st + 1;
    sol1 = 2LL * w + 1LL * y * dr;
    sol2 = 2LL * st * dr;
    r = cmmdc(sol1, sol2);
    sol1 /= r;
    sol2 /= r;
    cout << sol1 << "/" << sol2 << "\n";
  }
  return 0;
}
