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 gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) {
  return (a * b) / lcm(max(a, b), min(a, b));
}
bool isP(int now) {
  for (int i = 2; i * i <= now; i++)
    if (now % i == 0) return 0;
  return 1;
}
int main() {
  int tc;
  cin >> tc;
  for (int q = 0; q < tc; q++) {
    long long makh = 0, sor = 0;
    int n;
    cin >> n;
    n++;
    int back = 0;
    int one = 0;
    int two = 0;
    for (int i = n - 1; i; i--) {
      back++;
      if (isP(i)) {
        one = i;
        break;
      }
    }
    for (int i = n; i; i++)
      if (isP(i)) {
        two = i;
        break;
      }
    sor = one + (two - n);
    makh = (long long)one * two;
    if (makh % 2 == 1) {
      sor *= 2;
      makh *= 2;
    }
    sor = makh / 2 - sor;
    long long GCD = gcd(makh, sor);
    sor /= GCD;
    makh /= GCD;
    cout << sor << '/' << makh << endl;
  }
  return 0;
}
