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>).

def mcd(a,b):
    while (b!=0):
        resto=a%b
        a=b
        b=resto
    return a

def esPrimo(n):
    cont=0
    for k in range(2,n):
        if (n%k==0):
            cont=+1
            break
    if (cont==0):
        return True
    else: 
        return False       

entrada=int(input())
arreglo=[]
# leer valores de entrada
for k in range (0,entrada):
    valor=int(input())
    arreglo.append(valor)

# arreglo de resultados
resultados=[]
# procesar cada elemento
for k in range(0,len(arreglo)):
    num=0
    dem=1
    for i in range(2,arreglo[k]+1):
        vn=i
        un=i+1
        while(esPrimo(vn)==False):
            vn=vn-1
        while(esPrimo(un)==False):
            un=un+1
        num_n=1
        dem_n=vn*un
        num=num*dem_n+dem*num_n
        dem=dem*dem_n
    m_c_d=mcd(num,dem)
    num=int(num/m_c_d)
    dem=int(dem/m_c_d)
    resultados.append(str(num)+'/'+str(dem))
for j in range(0,len(resultados)):
    print(resultados[j])
    
    
        
