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;
bool pr(int v) {
  for (int i = 2; i <= 32000 && i < v; ++i) {
    if (v % i == 0) return false;
  }
  return true;
}
unsigned long long mdc(unsigned long long a, unsigned long long b) {
  if (b == 0) return a;
  return mdc(b, a % b);
}
unsigned long long mmc(unsigned long long a, unsigned long long b) {
  return a * b / mdc(a, b);
}
int main() {
  int t;
  cin >> t;
  while (t-- > 0) {
    int n;
    cin >> n;
    unsigned long long z, w;
    for (int i = n; i >= max(2, n - 1000); --i) {
      if (pr(i)) {
        z = i;
        break;
      }
    }
    for (int i = z + 1; i <= z + 1001; ++i) {
      if (pr(i)) {
        w = i;
        break;
      }
    }
    unsigned long long bot = 2 * z * w;
    unsigned long long top =
        bot / (2 * z) * (z - 2) + bot / (w * z) * (n - z + 1);
    unsigned long long div = mdc(top, bot);
    top /= div;
    bot /= div;
    cout << top << "/" << bot << endl;
  }
  return 0;
}
