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(1e-8);
int t;
long long n;
bool isprime(long long i) {
  if ((i & 1) == 0)
    return false;
  else {
    for (int j = 2; j * j <= i; j++) {
      if (i % j == 0) return false;
    }
    return true;
  }
}
long long finda(long long k) {
  while (!isprime(k + 1)) {
    k++;
  }
  return k + 1;
}
long long findi(long long k) {
  if (k == 2) return 2;
  while (!isprime(k)) {
    k--;
  }
  return k;
}
long long gcd(long long m, long long n) {
  if (m < n) {
    long long temp = m;
    m = n;
    n = temp;
  }
  if (m % n == 0) {
    return n;
  } else {
    return gcd(n, m % n);
  }
}
int main() {
  scanf("%d", &t);
  while (t--) {
    cin >> n;
    long long ansa = finda(n);
    long long ansi = findi(n);
    long long x = ansi * ansa + 2 * (n - ansa - ansi + 1);
    long long y = 2 * ansi * ansa;
    long long hehe = gcd(x, y);
    x /= hehe;
    y /= hehe;
    cout << x << "/" << y << endl;
  }
  return 0;
}
