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;
const double eps = 1.0e-11;
const double pi = acos(-1.0);
inline bool IsPrime(long long n) {
  for (int i = 2; i * i <= n; ++i)
    if (n % i == 0) return false;
  return true;
}
long long gcd(long long x, long long y) {
  while (x && y) {
    if (x < y)
      y %= x;
    else
      x %= y;
  }
  return x + y;
}
int main() {
  long long t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    long long l = n, r = n + 1;
    while (!IsPrime(l)) --l;
    while (!IsPrime(r)) ++r;
    long long u = l * r - 2 * r + 2 * n - 2 * l + 2;
    long long d = 2 * l * r;
    long long g = gcd(u, d);
    u /= g, d /= g;
    cout << u << "/" << d << endl;
  }
  return 0;
}
