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 MOD = 1000000007;
inline long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
inline int ceil(int a, int b) { return (a + b - 1) / b; }
bool isPrime(int n) {
  for (int i = 2; 1LL * i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
pair<long long, long long> reduce(pair<long long, long long> frac) {
  long long g = gcd(frac.first, frac.second);
  frac.first /= g;
  frac.second /= g;
  return frac;
}
pair<long long, long long> sum(int n) {
  int p, q;
  for (p = n; !isPrime(p); p--)
    ;
  for (q = n + 1; !isPrime(q); q++)
    ;
  return reduce(
      make_pair(1LL * p * q - 2 * q + 2 * n - 2 * p + 2, 2LL * p * q));
}
int main(void) {
  int T, n;
  cin >> T;
  for (int t = 0; t < T; t++) {
    cin >> n;
    pair<long long, long long> frac = sum(n);
    cout << frac.first << "/" << frac.second << "\n";
  }
  return 0;
}
