Given an integer N. Integers A and B are chosen randomly in the range [1..N]. Calculate the probability that the Greatest Common Divisor(GCD) of A and B equals to B.
-----Input-----
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows. Each test case consists of a single integer N on a separate line.
-----Output-----
For each test case, output a single line containing probability as an irreducible fraction. 
-----Example-----
Input:
3
1
2
3
Output:
1/1
3/4
5/9
-----Constraints-----
1<=T<=103
1<=N<=109
from collections import defaultdict
import sys
import math as m
import random as rd
import bisect as b
#import numpy as np
import time
sys.setrecursionlimit(1000000)


def uno(): return int(sys.stdin.readline().strip())


def dos(): return sys.stdin.readline().strip()


def tres(): return list(map(int, sys.stdin.readline().strip().split()))


def cuatro(): return sys.stdin.readline().strip().split()

################## CODE STARTS FROM HERE ######################


for _ in range(uno()):
 n = uno()
 ans, root = 0, m.floor(m.sqrt(n))
 for i in range(1, root+1):
  ans += n//i
 ans = ans+ans-root*root
 a, b = ans//m.gcd(ans, n*n), (n*n)//m.gcd(ans, n*n)
 print(str(a)+"/"+str(b))

from collections import defaultdict
import sys
import math as m
import random as rd
import bisect as b
#import numpy as np
import time
sys.setrecursionlimit(1000000)


def uno(): return int(sys.stdin.readline().strip())


def dos(): return sys.stdin.readline().strip()


def tres(): return list(map(int, sys.stdin.readline().strip().split()))


def cuatro(): return sys.stdin.readline().strip().split()

################## CODE STARTS FROM HERE ######################


for _ in range(uno()):
 n = uno()
 ans, root = 0, m.floor(m.sqrt(n))
 for i in range(1, root+1):
  ans += n//i
 ans = ans+ans-root*root
 a, b = ans//m.gcd(ans, n*n), (n*n)//m.gcd(ans, n*n)
 print(str(a)+"/"+str(b))
