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(int n) {
  int i = 2;
  while (i * i <= n) {
    if (n % i == 0) return false;
    i++;
  }
  return true;
}
int lowerPrime(int n) {
  int i = n;
  while (!isPrime(i)) i--;
  return i;
}
int upperPrime(int n) {
  int i = n + 1;
  while (!isPrime(i)) i++;
  return i;
}
long long gcd(long long a, long long b) {
  if (b % a == 0) return a;
  return gcd(b % a, a);
}
int main(int argc, char *argv[]) {
  int t;
  int n;
  cin >> t;
  long long vn, un, factor;
  for (int i = 0; i < t; i++) {
    cin >> n;
    vn = lowerPrime(n);
    un = upperPrime(n);
    factor = gcd(2 * n + (vn - 2) * (un - 2) - 2, 2 * vn * un);
    std::cout << (2 * n + (vn - 2) * (un - 2) - 2) / factor << "/"
              << (2 * vn * un) / factor << std::endl;
  }
  return 0;
}
