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;
const int INF = INT_MAX;
const bool debug = true;
const long long INFL = LLONG_MAX;
const int output_precision = 15;
stringstream ss;
int T, n;
bool isPrime(int n) {
  if (n == 1) return 0;
  int d = 2;
  while (d * d <= n) {
    if (n % d == 0) return 0;
    d++;
  }
  return 1;
}
long long gcd(long long x, long long y) { return y == 0 ? x : gcd(y, x % y); }
pair<long long, long long> add(pair<long long, long long> f1,
                               pair<long long, long long> f2) {
  long long G = gcd(f1.second, f2.second);
  long long A = f1.first * (f2.second / G) + f2.first * (f1.second / G);
  long long B = (f1.second / G) * f2.second;
  G = gcd(A, B);
  A /= G;
  B /= G;
  return make_pair(A, B);
}
vector<int> primes;
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(output_precision);
  cout << fixed;
  ss.precision(output_precision);
  ss << fixed;
  cin >> T;
  for (int(i) = 1; (i) <= (T); (i)++) {
    cin >> n;
    pair<long long, long long> ans = make_pair(1, 2);
    int v = n;
    int u = n + 1;
    while (!isPrime(v)) v--;
    while (!isPrime(u)) u++;
    ans = add(ans, make_pair(-1, v));
    ans = add(ans, make_pair(n - v + 1, 1LL * v * u));
    assert(ans.first >= 0);
    assert(ans.second >= 0);
    ss << ans.first << "/" << ans.second << '\n';
  }
  cout << ss.str();
}
