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(long long n) {
  long long i;
  for (i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(false);
  long long n;
  long long up, down;
  long long zi, mu;
  int t;
  while (~scanf("%d", &t)) {
    while (t--) {
      scanf("%I64d", &n);
      if (isprime(n + 1)) {
        printf("%I64d/%I64d\n", n - 1, 2 * (n + 1));
      } else {
        for (up = n + 2;; up++) {
          if (isprime(up)) {
            break;
          }
        }
        for (down = n;; down--) {
          if (isprime(down)) {
            break;
          }
        }
        int tmp = up - 1 - n;
        printf("%I64d/%I64d\n", (up - 2) * down - 2 * tmp, 2 * up * down);
      }
    }
  }
  return 0;
}
