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;
int IsPrime(int m) {
  int k, i;
  if (m <= 1) return 0;
  k = sqrt(m);
  for (i = 2; i <= k; i++)
    if (m % i == 0) return 0;
  return 1;
}
long long GCD(long long a, long long b) { return (b > 0) ? GCD(b, a % b) : a; }
int main() {
  int t, k;
  int p1, p2;
  cin >> t;
  while (t--) {
    scanf("%d", &k);
    for (p1 = k; !IsPrime(p1); p1--)
      ;
    for (p2 = k + 1; !IsPrime(p2); p2++)
      ;
    long long fz = 1LL * p1 * p2 - 2 * p2 - 2 * p1 + 2 * k + 2;
    long long fm = 1LL * 2 * p1 * p2;
    long long gcd = GCD(fz, fm);
    printf("%I64d/", fz / gcd);
    printf("%I64d\n", fm / gcd);
  }
  return 0;
}
