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 math
def GCD(a,b):
	if b==0:
		return a
	return GCD(b,a%b)
	
def isPrime(n):
	if n==2 or n==3:
		return True
	elif n==1:
		return False
	else:
		for i in range(2,int(math.ceil(math.sqrt(n)))+1):
			if n%i==0:
				return False
		return True
	
def V(N):
	In = N
	while In>=1:
		if isPrime(In):
			return In
		In-=1
	return -1
	
def U(N):
	In = N+1
	while True:
		if isPrime(In):
			return In
		In+=1

t = int(input())
for i in range(t):
	n = int(input())
	resa = 1
	resb = 6
	lastl = 2
	lasth = 3
	for i in range(3,n+1):
		pl = 0
		ph = 0
		if isPrime(i):
			pl = i
		else:
			pl = lastl
		if lasth <= i:
			ph = U(i)
		else:
			ph = lasth 
		q = pl*ph
		resa = (resa*q) + resb
		resb = resb*q
		lastl = pl
		lasth = ph
	gcd = GCD(resa,resb)
	resa//=gcd
	resb//=gcd
	print(str(resa)+"/"+str(resb))