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 text;
bool isPrime(long long k) {
  for (long long i = 2; i * i <= k; i++)
    if (k % i == 0) return 0;
  return 1;
}
long long gcd(long long n, long long m) { return m ? gcd(m, n % m) : n; }
int doing() {
  long long n, minp, maxp, a1, b1, a2, b2, a3, b3, t;
  cin >> n;
  minp = n;
  maxp = n + 1;
  while (!isPrime(minp)) minp--;
  while (!isPrime(maxp)) maxp++;
  a1 = minp - 2;
  b1 = minp * 2;
  t = gcd(a1, b1);
  a1 /= t;
  b1 /= t;
  a2 = n - minp + 1;
  b2 = maxp * minp;
  t = gcd(a2, b2);
  a2 /= t;
  b2 /= t;
  t = gcd(b1, b2);
  a3 = a1 * (b2 / t) + a2 * (b1 / t);
  b3 = b1 / t * b2;
  t = gcd(a3, b3);
  a3 /= t;
  b3 /= t;
  cout << a3 << "/" << b3 << endl;
  return 0;
}
int main() {
  cin >> text;
  while (text--) doing();
  return 0;
}
