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) {
  long long m = (long long)sqrt(n + 0.5);
  for (long long i = 2; i <= m; ++i)
    if (n % i == 0) return false;
  return true;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int t;
  long long n;
  cin >> t;
  while (t--) {
    cin >> n;
    long long u = n, v = n + 1;
    while (!isprime(u)) --u;
    while (!isprime(v)) ++v;
    long long q = u * v - 2 * v - 2 * u + 2 * n + 2, p = 2 * u * v;
    long long t = gcd(q, p);
    cout << q / t << "/" << p / t << endl;
  }
  return 0;
}
