# cook your code here
# your code goes here
#from fractions import gcd
t=int(raw_input())
for i in range(t):
	v=map(int,raw_input().split())
	p=v[0]*v[1]
	m=p/2
	if p%2:
		print str(m)+'/'+str(p)
	else:
		print '1/2'