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>
typedef struct fraction {
  long long numer, denom;
} fract;
int is_prime(int n) {
  int i;
  for (i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
long long gcd(long long a, long long b) { return (a == 0) ? b : gcd(b % a, a); }
fract reduce(fract re) {
  long long g = gcd(re.numer, re.denom);
  return (fract){re.numer / g, re.denom / g};
}
int main(void) {
  long long i, j, n, t;
  scanf("%I64d", &t);
  while (t--) {
    scanf("%I64d", &n);
    if (n == 2)
      printf("1/6\n");
    else {
      for (i = n; i >= 3; i--)
        if (i % 2 && is_prime(i)) break;
      for (j = n + 1;; j++)
        if (j % 2 && is_prime(j)) break;
      fract ans = reduce((fract){(i - 2) * j + (n - i + 1) * 2, 2 * i * j});
      printf("%I64d/%I64d\n", ans.numer, ans.denom);
    }
  }
  return 0;
}
