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;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  if (b == 0) return a;
  if (a < b) return gcd(b, a);
  return gcd(b, a % b);
}
bool isprime(int p) {
  for (int i = 2; (long long)i * i <= p; i++)
    if (p % i == 0) return false;
  return true;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int p = n;
    int q = n + 1;
    while (!isprime(p)) p--;
    while (!isprime(q)) q++;
    unsigned long long den = 2LL * p * q;
    unsigned long long num =
        (unsigned long long)p * q - 2LL * q + 2LL * (n - p + 1);
    unsigned long long g = gcd(num, den);
    num /= g;
    den /= g;
    cout << num << "/" << den << "\n";
  }
  return 0;
}
