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 $\sum_{i = 2}^{n} \frac{1}{v(i) u(i)}$.


-----Input-----

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


-----Output-----

Print t lines: the i-th of them must contain the answer to the i-th test as an irreducible fraction "p/q", where p, q are integers, q > 0.


-----Examples-----
Input
2
2
3

Output
1/6
7/30

Difficulty: competition

Starter code:

Solutions:
def prime(n):
    m = int(n ** 0.5) + 1
    t = [1] * (n + 1)
    for i in range(3, m):
        if t[i]: t[i * i :: 2 * i] = [0] * ((n - i * i) // (2 * i) + 1)
    return [2] + [i for i in range(3, n + 1, 2) if t[i]]

def gcd(a, b):
    c = a % b
    return gcd(b, c) if c else b

p = prime(31650)
def g(n):
    m = int(n ** 0.5)
    for j in p:
        if n % j == 0: return True
        if j > m: return False

def f(n):
    a, b = n, n + 1
    while g(a): a -= 1
    while g(b): b += 1
    p, q = (b - 2) * a + 2 * (n - b + 1), 2 * a * b
    d = gcd(p, q)
    print(str(p // d) + '/' + str(q // d))

for i in range(int(input())): f(int(input()))


T = int( input() )

#for every prime x
#(b-a)/ab
#1/a-1/b

MAX = 33000

bePrime = [0] * MAX;
primNum = []

for j in range(2, MAX):
    if bePrime[j] == 0: 
        primNum.append( j )
        i = j
        while i < MAX:
            bePrime[i] = 1
            i = i + j

def isPrime( a ):
    for j in primNum:
        if j >= a:
            return True
        if a % j == 0:
            return False
    return True

def gcd( a, b ):
    if b == 0:
        return a
    return gcd( b, a % b );

while T > 0:
    num = 0;
    n = int( input() )

    m = n
    while isPrime(m) == False:
        m -= 1
    while isPrime(n + 1) == False:
        n += 1
        num += 1

    a = n - 1
    b = 2 * ( n+1 )

    a = a * (n+1) * m - num * b
    b = b * (n+1) * m

    g = gcd( a, b)
    a //= g
    b //= g


    print( '{0}/{1}'.format( a, b  ) )
    T -= 1;


def prime(n):
    m = int(n ** 0.5) + 1
    t = [1] * (n + 1)
    for i in range(3, m):
        if t[i]: t[i * i :: 2 * i] = [0] * ((n - i * i) // (2 * i) + 1)
    return [2] + [i for i in range(3, n + 1, 2) if t[i]]

def gcd(a, b):
    c = a % b
    return gcd(b, c) if c else b

p = prime(31650)
def g(n):
    m = int(n ** 0.5)
    for j in p:
        if n % j == 0: return True
        if j > m: return False

def f(n):
    a, b = n, n + 1
    while g(a): a -= 1
    while g(b): b += 1
    p, q = (b - 2) * a + 2 * (n - b + 1), 2 * a * b
    d = gcd(p, q)
    print(str(p // d) + '/' + str(q // d))

for i in range(int(input())): f(int(input()))

def isPrime(n):
    i = 2
    while i * i <= n:
        if n % i == 0:
            return False
        i += 1
    return True

def prevPrime(n):
    while not isPrime(n):
        n -= 1
    return n

def nextPrime(n):
    n += 1
    while not isPrime(n):
        n += 1
    return n

def gcd(a, b):
    while(a):
        b %= a
        a, b = b, a
    return b;

def solve():
    n = int(input())
    prev = prevPrime(n);
    next = nextPrime(n);
    num1 = prev - 2;
    den1 = prev * 2;
    g = gcd(num1, den1);
    num1 //= g;
    den1 //= g;
    num2 = n - prev + 1;
    den2 = prev * next;
    g = gcd(num2, den2);
    num2 //= g;
    den2 //= g;
    g = gcd(num1 * den2 + num2 * den1, den1 * den2);
    x = (num1 * den2 + num2 * den1) // g;
    y = den1 * den2 // g;
    print('{}/{}'.format(x, y))

t = int(input())
while t:
    t -= 1
    solve()


T = int( input() )

MAX = 33000

bePrime = [0] * MAX;
primNum = []

for j in range(2, MAX):
    if bePrime[j] == 0: 
        primNum.append( j )
        i = j
        while i < MAX:
            bePrime[i] = 1
            i = i + j

def isPrime( a ):
    for j in primNum:
        if j >= a:
            return True
        if a % j == 0:
            return False
    return True

def gcd( a, b ):
    if b == 0:
        return a
    return gcd( b, a % b );

while T > 0:
    num = 0;
    n = int( input() )

    m = n
    while isPrime(m) == False:
        m -= 1
    while isPrime(n + 1) == False:
        n += 1
        num += 1

    a = n - 1
    b = 2 * ( n+1 )

    a = a * (n+1) * m - num * b
    b = b * (n+1) * m

    g = gcd( a, b)
    a //= g
    b //= g


    print( '{0}/{1}'.format( a, b  ) )
    T -= 1;