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;
int n, t;
long long x, y;
int p[100005];
long long s[100005];
int tot;
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
int main() {
  for (int i = 2; i <= 100000; i++)
    if (p[i] == 0) {
      s[tot++] = i;
      for (int j = i + i; j <= 100000; j += i) p[j] = 1;
    }
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &n);
    x = 0;
    y = 2e9;
    for (int i = max(2, n - 500); i <= n + 500; i++) {
      int flag = 1;
      for (int j = 0; s[j] * s[j] <= i; j++)
        if (i % s[j] == 0) {
          flag = 0;
          break;
        }
      if (flag && x < i && i <= n) x = i;
      if (flag && y > i && i > n) y = i;
    }
    long long up = x * y + 2 * n - 2 * x - 2 * y + 2;
    long long down = 2 * x * y;
    long long tmp = gcd(up, down);
    up /= tmp;
    down /= tmp;
    cout << up << "/" << down << endl;
  }
  return 0;
}
