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 N = 1e5 + 10;
int cnt, prime[N], flag[N];
long long u, v, p, q, d;
inline int isPrime(int k) {
  if (k < N) return !flag[k];
  for (int i = 0; i < cnt && prime[i] <= k; i++)
    if (k % prime[i] == 0) return 0;
  return 1;
}
inline long long under(int n) {
  for (int i = n; i >= 2; i--)
    if (isPrime(i)) return i;
  return 0;
}
inline long long up(int n) {
  for (int i = n + 1; i; i++)
    if (isPrime(i)) return i;
  return 0;
}
inline int gcd(long long p, long long q) {
  if (!q)
    return p;
  else
    return gcd(q, p % q);
}
int main() {
  int tcase, n;
  scanf("%d", &tcase);
  while (tcase--) {
    scanf("%d", &n);
    cnt = 0;
    memset(flag, 0, sizeof(flag));
    for (int i = 2; i < N; i++) {
      if (!flag[i]) {
        prime[cnt++] = i;
        for (int j = i * 2; j < N; j += i) flag[j] = 1;
      }
    }
    v = under(n);
    u = up(n);
    p = u * v + 2 * (n - v - u + 1);
    q = 2 * u * v;
    d = gcd(p, q);
    cout << p / d << "/" << q / d << endl;
  }
}
