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;
bool isPrime(long long n) {
  if (n == 2 || n == 3) return true;
  if (!(n % 6 == 1 || n % 6 == 5)) return false;
  long long lim = (long long)sqrt(n + 1);
  for (int i = 3; i <= lim; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
long long nextprime(long long i) {
  i++;
  while (!isPrime(i)) {
    i++;
  }
  return i;
}
int main() {
  int t;
  cin >> t;
  while (t-- > 0) {
    long long n;
    cin >> n;
    long long p = n;
    while (!isPrime(p + 1)) {
      p--;
    }
    long long lastp = p;
    long long num = (p + 1) - 2;
    long long denom = 2 * (p + 1);
    while (p < n) {
      p++;
      if (isPrime(p)) {
        long long newdenom = 2 * p * nextprime(p);
        num *= newdenom / denom;
        denom = newdenom;
      }
      num += 2;
    }
    cout << num << "/" << denom << endl;
  }
  return 0;
}
