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;
const int maxn = 200000 + 10;
bool judge(long long x) {
  if (x == 2) return true;
  long long Mx = sqrt(x) + 1;
  for (int i = 2; i <= Mx; i++) {
    if (x % i == 0) return false;
  }
  return true;
}
long long gcd(long long x, long long y) {
  return x % y == 0 ? y : gcd(y, x % y);
}
long long ans1, ans2, n;
int main() {
  int T;
  cin >> T;
  while (T--) {
    cin >> n;
    long long Up;
    for (Up = n + 1; Up; Up++) {
      if (judge(Up)) break;
    }
    long long Down;
    for (Down = n; Down; Down--) {
      if (judge(Down)) break;
    }
    ans1 = 2 * (n - Down + 1);
    ans2 = 2 * Down * Up;
    long long xx, yy;
    xx = (Down - 2) * Up;
    yy = 2 * Down * Up;
    ans1 += xx;
    long long tmp = gcd(ans1, ans2);
    ans1 /= tmp;
    ans2 /= tmp;
    cout << ans1 << '/' << ans2 << endl;
  }
  return 0;
}
