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>
bool IsPrime(long long x) {
  for (long long i = 2; i <= (long long)sqrt(x); i++) {
    if (x % i == 0) return false;
  }
  return true;
}
long long Getv(long long n) {
  for (long long i = n; i >= 2; i--) {
    if (IsPrime(i)) return i;
  }
}
long long Getu(long long n) {
  for (long long i = n + 1;; i++) {
    if (IsPrime(i)) return i;
  }
}
long long gcd(long long da, long long xiao) {
  long long tmp;
  while (xiao) {
    tmp = da % xiao;
    da = xiao;
    xiao = tmp;
  }
  return da;
}
int main() {
  int t;
  long long n, v, u, fz, fm, tmp;
  scanf("%d", &t);
  while (t--) {
    scanf("%lld", &n);
    v = Getv(n);
    u = Getu(n);
    fz = (v - 2) * u + 2 * (n - v + 1);
    fm = 2 * v * u;
    tmp = gcd(fm, fz);
    fz /= tmp;
    fm /= tmp;
    printf("%lld/%lld\n", fz, fm);
  }
  return 0;
}
