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
from math import gcd


def prime(n):
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            return False
    return True


for i in range(int(input())):
    n = int(input())
    x = n
    y = n + 1
    while not prime(x):
        x -= 1
    while not prime(y):
        y += 1
    p = 2 * n - 2 * x + 2 + y * x - 2 * y
    q = 2 * y * x
    d = gcd(p, q)
    p //= d
    q //= d
    print(str(p) + '/' + str(q))