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 T, n, x, y;
bool isPrime(int n) {
  if (n % 2 == 0 && n > 2) return 0;
  for (int i = 3; i <= int(sqrt(n)); i += 2)
    if (n % i == 0) return 0;
  return 1;
}
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  return b == 0 ? a : gcd(b, a % b);
}
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%d", &n);
    if (n == 2) {
      puts("1/6");
      continue;
    }
    for (int i = n;; --i)
      if (isPrime(i)) {
        x = i;
        break;
      }
    for (int i = n + 1;; ++i)
      if (isPrime(i)) {
        y = i;
        break;
      }
    unsigned long long tu = (unsigned long long)x * (y - 2) -
                            (unsigned long long)2 * (y - 1 - n),
                       mau = (unsigned long long)x * y * 2;
    unsigned long long d = gcd(tu, mau);
    cout << tu / d << '/' << mau / d << '\n';
  }
}
