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>
int tcase;
int icase;
long long n, d;
long long ls, rs;
long long fm, fz;
int su(long long d) {
  long long i;
  for (i = 2; i * i <= d && d % i != 0; i++)
    ;
  return i * i > d;
}
int main() {
  for (scanf("%d", &tcase); ++icase <= tcase;) {
    scanf("%I64d", &n);
    ls = n;
    for (; !su(ls); ls--)
      ;
    rs = n + 1;
    for (; !su(rs); rs++)
      ;
    d = ls + rs - n;
    d = d - 1LL;
    d = d * 2LL;
    fz = ls * rs;
    fz = fz - d;
    fm = ls * rs;
    fm = fm * 2LL;
    if (fz % 2 == 0) {
      fz /= 2LL;
      fm /= 2LL;
    }
    if (fz % ls == 0) {
      fz /= ls;
      fm /= ls;
    }
    if (fz % rs == 0) {
      fz /= rs;
      fm /= rs;
    }
    printf("%I64d/%I64d\n", fz, fm);
  }
}
