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 fractions

t, res = int(input()), 0


def v(n):
    n2 = n
    ok = 0
    while not ok:
        cont = 1
        for i in range(2, n // 2):
            if n % i == 0:
                cont = 0
        if cont:
            ok = 1
        else:
            n2 -= 1
    return n2


def u(n):
    ok = 0
    n += 1
    while not ok:
        cont = 1
        for i in range(2, n // 2 + 1):
            if n % i == 0:
                cont = 0
        if cont:
            ok = 1
        else:
            n += 1
    return n


while t:
    n = int(input())
    res += 1 / (u(n) * v(n))
    print(fractions.Fraction(res).limit_denominator())
    t -= 1
