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;
int n;
bool IsPrime(int a) {
  if (a < 2) return false;
  if (a == 2 || a == 3) return true;
  for (int i = 2; i <= (int)sqrt(a); ++i)
    if (a % i == 0) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  int nTests;
  scanf("%d", &nTests);
  long long p, q;
  while (nTests--) {
    scanf("%d", &n);
    for (int i = n + 1;; ++i)
      if (IsPrime(i)) {
        q = i;
        break;
      }
    for (int i = n;; --i)
      if (IsPrime(i)) {
        p = i;
        break;
      }
    long long tu = p * q - 2 * q - 2 * p + (n + 1) * 2;
    long long mau = 2 * p * q;
    if (tu % p == 0 && mau % p == 0) tu /= p, mau /= p;
    if (tu % q == 0 && mau % q == 0) tu /= q, mau /= q;
    cout << tu << "/" << mau << endl;
  }
  return 0;
}
