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;
long long int gcd(long long int n, long long int m) {
  if (n % m == 0) return m;
  return gcd(m, n % m);
}
int main() {
  int T, n;
  scanf("%d", &T);
  while (T--) {
    scanf("%d", &n);
    int p1, p2;
    for (int i = n + 1;; i++) {
      int flag = 1;
      for (int j = 2; j * j <= i; j++) {
        if (i % j == 0) {
          flag = 0;
          break;
        }
      }
      if (flag) {
        p1 = i;
        break;
      }
    }
    for (int i = n;; i--) {
      int flag = 1;
      for (int j = 2; j * j <= i; j++) {
        if (i % j == 0) {
          flag = 0;
          break;
        }
      }
      if (flag) {
        p2 = i;
        break;
      }
    }
    long long int x = 1LL * p1 * p2 - 2LL * p1 + 2LL * (n - p2 + 1);
    long long int y = 2LL * p1 * p2;
    long long int d = gcd(x, y);
    x /= d, y /= d;
    printf("%lld/%lld\n", x, y);
  }
  return 0;
}
