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;
bool isPrime(long long number) {
  if (number == 1)
    return false;
  else if (number == 2 || number == 3)
    return true;
  else {
    long long num = (long long)(sqrt((double)number));
    for (long long i = 2; i <= num + 2; i++) {
      if (number % i == 0) return false;
    }
    return true;
  }
}
long long getPrevPrime(long long n) {
  while (!isPrime(n)) n--;
  return n;
}
long long getNextPrime(long long n) {
  n++;
  while (!isPrime(n)) n++;
  return n;
}
long long gcd(long long a, long long b) {
  while (b > 0) {
    long long t = a;
    a = b;
    b = t % a;
  }
  return a;
}
int main() {
  int i, t;
  while (scanf("%d", &t) != EOF) {
    while (t--) {
      long long n, prevPrime, nextPrime;
      scanf("%I64d", &n);
      prevPrime = getPrevPrime(n);
      nextPrime = getNextPrime(n);
      long long num = n - prevPrime + 1, g;
      long long ansN = nextPrime * (prevPrime - 2) + 2 * num;
      long long ansD = 2 * nextPrime * prevPrime;
      g = gcd(ansN, ansD);
      printf("%I64d/%I64d\n", ansN / g, ansD / g);
    }
  }
  return 0;
}
