from fractions import gcd

num_of_tries = int(raw_input())

for x in xrange(num_of_tries):
	alice, bob = map(int, raw_input().split())

	alice_drinks = 0
	tries = alice * bob

	# times drunk = alice.num_even * bob.num_odd + alice.num_odd * bob.num_even
	alice_drinks = (alice / 2) * ((bob + 1) / 2) + ((alice + 1) / 2) * (bob / 2)

	divisor = gcd(alice_drinks, tries)
	print "{0}/{1}".format(alice_drinks / divisor, tries / divisor)