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;
long long gcd(long long a, long long b) {
  if (a < 0) a = -a;
  if (b < 0) b = -b;
  while (a && b) a > b ? a %= b : b %= a;
  return a + b;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
pair<long long, long long> ad(pair<long long, long long> p1,
                              pair<long long, long long> p2) {
  long long t = lcm(p1.second, p2.second);
  p1.first = p1.first * (t / p1.second) + p2.first * (t / p2.second);
  p1.second = t;
  t = gcd(t, p1.first);
  p1.first /= t;
  p1.second /= t;
  return p1;
}
bool pr(long x) {
  for (int i = 2; i * i <= x; i++)
    if (x % i == 0) return false;
  return true;
}
long long tests, n, q, t;
pair<long long, long long> ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> tests;
  for (; tests; --tests) {
    cin >> n;
    long q = n + 1;
    t = n + 1;
    while (pr(t) == 0) ++t;
    while (pr(q) == 0) --q;
    ans = make_pair(1, 2);
    ans = ad(ans, make_pair(-1, q));
    ans = ad(ans, make_pair(n - q + 1, t * q));
    cout << ans.first << "/" << ans.second << endl;
  }
  cin.get();
  cin.get();
  return 0;
}
