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 fractions import *

def is_prime(x):
    i = 2
    while i ** 2 <= x:
        if x % i == 0:
            return False
        i += 1
    return True
    

def prime_above(x):
    while not is_prime(x + 1):
        x += 1
    return x + 1

def prime_below(x):
    while not is_prime(x):
        x -= 1
    return x

def solve(x):
    px = prime_below(x)
    px1 = prime_above(x)
    return Fraction(1, 2) - Fraction(1, px) + Fraction(x - px + 1, px * px1);
def tsolve(x):
    res = Fraction(0, 1)
    for i in xrange(2, x + 1):
        res += Fraction(1, prime_below(i) * prime_above(i))
    return res
t = int(raw_input())
for i in xrange(t):
    x = int(raw_input())
    r = solve(x)
    #assert tsolve(x) == solve(x)
    print('%d/%d' % (r.numerator, r.denominator))
