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>
long long mdc(long long a, long long b) {
  if (a % b == 0)
    return b;
  else
    return mdc(b, a % b);
}
bool prime(long long a) {
  for (int i = 2; i * i <= a; i++) {
    if (a % i == 0) return 0;
  }
  return 1;
}
int main() {
  int T;
  scanf("%d", &T);
  for (int i = 0; i < T; i++) {
    long long N;
    scanf("%I64d", &N);
    long long aux1 = N;
    long long aux2 = N + 1;
    while (!prime(aux1)) {
      aux1--;
    }
    while (!prime(aux2)) {
      aux2++;
    }
    long long num, den;
    if (N == 2) {
      num = aux2 - 2;
      den = 2 * aux2;
    } else {
      num = aux2 * (aux1 - 2) + 2 * (N - aux1 + 1);
      den = 2 * aux1 * aux2;
    }
    int m = mdc(num, den);
    num /= m;
    den /= m;
    printf("%I64d/%I64d\n", num, den);
  }
  scanf("%.d");
}
