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 math import*
t = int(input())
def snt(n):
    for i in range(2,int((sqrt(n))+1)):
        if(n%i==0):
            return 0
    return 1
def ucln(a,b):
    while(a>0 and b>0):
        if(a>b):
            a=a%b
        else:
            b=b%a
    if(a>0):
        return a
    return b
for i in range(t):
    n = int(input())
    a = n
    b = n+1
    while(snt(a)==0):
        a-=1
    while(snt(b)==0):
        b+=1
    tu = a*b+2*(n-a-b+1)
    mau = 2*a*b
    if(ucln(tu,mau)!=1):
        uc = ucln(tu,mau)
        tu=int(tu/uc)
        mau =int(mau/uc)
    print(str(tu)+'/'+str(mau))