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 exp(long long b, long long e) {
  if (b == 1 || e == 0) return 1;
  if (e == 1) return b % 1000000007;
  if (e == 2) return (b * b) % 1000000007;
  return ((e % 2 == 0)
              ? exp(exp(b, e / 2), 2) % 1000000007
              : (b * (exp(exp(b, e / 2), 2) % 1000000007)) % 1000000007);
}
long long gcd(long long a, long long b) {
  return ((b == 0) ? a : gcd(b, a % b));
}
long long p[5000];
int main() {
  p[0] = 2;
  int k = 1;
  for (int i = 3; i < 32000; ++i) {
    bool fl = true;
    for (int j = 0; p[j] * p[j] <= i; ++j) {
      if (i % p[j] == 0) {
        fl = false;
        break;
      }
    }
    if (fl) p[k++] = i;
  }
  int t;
  scanf("%d", &t);
  while (t--) {
    long long n, i, j, k, p0, q0, p1, p2;
    scanf("%lld", &n);
    for (i = n;; --i) {
      bool fl = true;
      for (int u = 0; p[u] * p[u] <= i; ++u) {
        if (i % p[u] == 0) {
          fl = false;
          break;
        }
      }
      if (fl) {
        p1 = i;
        break;
      }
    }
    for (i = n + 1;; ++i) {
      bool fl = true;
      for (int u = 0; p[u] * p[u] <= i; ++u) {
        if (i % p[u] == 0) {
          fl = false;
          break;
        }
      }
      if (fl) {
        p2 = i;
        break;
      }
    }
    p0 = p1 * p2 - 2 * (p1 + p2) + 2 * (n + 1);
    q0 = 2 * p1 * p2;
    long long g = gcd(p0, q0);
    printf("%lld/%lld\n", p0 / g, q0 / g);
  }
  return 0;
}
