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>
int fun(long long n) {
  long long i;
  int flag = 0;
  for (i = 2; i * i <= n; i++)
    if (n % i == 0) return 0;
  return 1;
}
long long u(long long n) {
  while (!fun(n)) n--;
  return n;
}
long long v(long long n) {
  n++;
  while (!fun(n)) n++;
  return n;
}
int gcd(long long m, long long n) {
  long long temp;
  while (n != 0) {
    temp = m % n;
    m = n;
    n = temp;
  }
  return m;
}
int main() {
  int t;
  long long n, a, b, p, q, m;
  scanf("%d", &t);
  while (t--) {
    scanf("%lld", &n);
    a = u(n);
    b = v(n);
    p = 2 * (n + 1) - 2 * (a + b) + a * b;
    q = 2 * a * b;
    m = gcd(p, q);
    printf("%lld/%lld\n", p / m, q / m);
  }
  return 0;
}
