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;
inline long long read() {
  long long k = 0;
  char c = getchar();
  while ('0' > c || c > '9') c = getchar();
  while ('0' <= c && c <= '9') k = k * 10 + c - '0', c = getchar();
  return k;
}
long long T;
inline int check(long long a) {
  for (int i = 2; i * i <= a; i++)
    if (a % i == 0) return 0;
  return 1;
}
inline long long gcd(long long a, long long b) {
  return a % b == 0 ? b : gcd(b, a % b);
}
int main() {
  T = read();
  while (T--) {
    long long n = read(), i = n, j = n + 1;
    while (!check(i)) i--;
    while (!check(j)) j++;
    long long a = i * j + 2 * (n + 1 - i - j), b = i * j * 2, d = gcd(a, b);
    a /= d, b /= d;
    printf("%lld/%lld\n", a, b);
  }
}
