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>
const int MAXN = 31700;
using namespace std;
int t, n;
bool f[MAXN + 5];
vector<int> prime;
bool is_prime(long long);
long long GCD(long long, long long);
int main() {
  std::ios::sync_with_stdio(false);
  memset(f, true, sizeof(f));
  int most = sqrt(MAXN);
  for (int i = 3; i <= most; i += 2) {
    if (f[i] == true) {
      for (int j = i * i; j <= MAXN; j += i << 1) f[j] = false;
    }
  }
  prime.push_back(2);
  for (int i = 3; i <= MAXN; i += 2)
    if (f[i]) prime.push_back(i);
  cin >> t;
  while (t--) {
    cin >> n;
    long long larger = n + 1, less = n;
    while (!is_prime(larger)) larger++;
    while (!is_prime(less)) less--;
    long long num = 2 * less * larger,
              deno = less * larger - larger * 2 + 2 * (n - less + 1);
    long long gcd = GCD(num, deno);
    num /= gcd;
    deno /= gcd;
    cout << deno << "/" << num << endl;
  }
  return 0;
}
inline bool is_prime(long long x) {
  for (int i = 0; i < prime.size(); i++)
    if (x != prime[i] && x % prime[i] == 0) return false;
  return !(x < 2);
}
long long GCD(long long x, long long y) {
  while (x % y != 0) {
    long long z = x % y;
    x = y;
    y = z;
  }
  return y;
}
