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 prime(n):
    if(n<2):
        return 0
    
    for i in range(2,n//2+1):
        if(n%i==0):
            return 0

    return 1

def pgcd(a,b):
    if a<b:
        a,b=b,a
    while b!=0:
        a,b=b,a%b
    return a

def setU(n):
    i=n+1
    while not prime(i):
        i+=1

    return i

def setV(n):
    i=n

    while not prime(i):
        i-=1
    
    return i

def sumPrime(n):
    a=setU(n)
    return (a-2)*setV(a-1)
    





t=int(input())

for i in range(0,t):
    n=int(input())
    x=setU(n)
    a=sumPrime(n)-2*(x-1-n)
    b=2*setV(n)*x
    p=pgcd(a,b)
    a//=p
    b//=p
    print(str(a)+'/'+str(b))