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>).
import math
def prime(n):
    root = int(math.sqrt(n))
    i=2
    while(i<=root):
        if(n%i==0):
            return 0
        i+=1
    return 1
def diviseur(num):
    root = int(math.sqrt(num))
    i = 2
    div = []
    while(i < root):
        if(num % i == 0):
            div.append(i)
            num /= i
            while(num % i == 0):
                num /= i
        i += 1
    return div
def pgcd(a, b):
    while b != 0:
        r = a % b
        a, b = b, r
    return a
def reduc(a,b):
    pg = pgcd(a,b)
    return a/pg,b/pg
nb = int(input())
for i in range(nb):
    l = []
    a = int(input())
    l ,m= a,a+1
    """for x in range(2,a+1):
        vn = x
        for j in range(x,1,-1):
            if(prime(j)==1):
                vn = j
                break
        x+=1
        un = x
        while(1):
            if(prime(x)==1):
                un = x
                break
            x+=1
        l.append(un*vn)"""
    while(prime(l)==0):
        l-=1
    while(prime(m)==0):
        m+=1
    aa = l * m-2*m+2*(a-l+1)
    bb = 2*l*m
    g = pgcd(aa,bb)
    print(str(int(aa/g))+"/"+str(int((bb/g))))
