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 long long N = 32e3;
long long t, n, v, u, p, q, mark[N];
vector<long long> vec;
bool is_prime(long long x) {
  for (long long i : vec) {
    if (i * i > x) return 1;
    if (x % i == 0) return 0;
  }
  return 1;
}
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  for (long long i = 2; i < N; i++)
    if (!mark[i]) {
      vec.push_back(i);
      for (long long j = 2 * i; j < N; j += i) mark[j] = 1;
    }
  cin >> t;
  while (t--) {
    cin >> n;
    for (long long i = n;; i--)
      if (is_prime(i)) {
        v = i;
        break;
      }
    for (long long i = n + 1;; i++)
      if (is_prime(i)) {
        u = i;
        break;
      }
    p = 2 * n + 2 + v * u - 2 * v - 2 * u;
    q = 2 * v * u;
    long long g = gcd(p, q);
    p /= g;
    q /= g;
    cout << p << "/" << q << '\n';
  }
}
