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
import java.io.*;
import java.util.*;
import java.math.BigInteger;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int t = in.nextInt();
    while (t-- > 0) {
      int n = in.nextInt();
      int p = n;
      int q = n + 1;
      while (!isPrime(p)) --p;
      while (!isPrime(q)) ++q;
      BigInteger a = BigInteger.valueOf(p - 2);
      BigInteger b = BigInteger.valueOf(2 * p);
      BigInteger c = BigInteger.valueOf(n - p + 1);
      BigInteger d = BigInteger.valueOf(p).multiply(BigInteger.valueOf(q));
      BigInteger y = b.multiply(d).divide(b.gcd(d));
      BigInteger x = y.divide(b).multiply(a).add(y.divide(d).multiply(c));
      BigInteger gcd = x.gcd(y);
      x = x.divide(gcd);
      y = y.divide(gcd);
      System.out.println(x + "/" + y);
    }
  }

  static boolean isPrime(int n) {
    if (n == 2)
      return true;
    if (n == 1 || n % 2 == 0)
      return false;
    for (int i = 3; i * i <= n; i += 2)
      if (n % i == 0)
        return false;
    return true;
  }
}
