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 <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/9efda33382293068ce21371b950297a1d3ac3212.png" style="max-width: 100.0%;max-height: 100.0%;"/>.
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* ≤ 10<sup class="upper-index">9</sup>).
from fractions import Fraction

def isprime(n):
    """Returns True if n is prime."""
    if n%2 == 0 or n % 3 == 0:
        return False

    i = 5
    w = 2

    while i * i <= n:
        if n % i == 0:
            return False

        i += w
        w = 6 - w

    return True

ub = 1000000000
num_c = [0]*ub
den_c = [0]*ub
num_c[2] = 1
den_c[2] = 6
last_p = 3
for i in range(3, ub):
    if isprime(i):
        f = Fraction(num_c[last_p-1], den_c[last_p-1])
        for j in range(last_p, i):
            f = f + Fraction(1, last_p * i)
            num_c[j], den_c[j] = f.numerator, f.denominator
        last_p = i
for _ in range(int(input())):
    n = int(input())
    print('{}/{}'.format(num_c[n], den_c[n]))
