#!/usr/bin/python
def mult(a,b):
	if b%2==0 :
		return (a/2)*(b/2)
	else :	
		return (a/2)*(b/2+1)
def gcd(a,b):
	r=0;
	while b!=0:
		r=a%b;
		a=b;
		b=r;
	return a;		
N=int(raw_input(""));
for tst in range(0,N):
	I=raw_input("").split(" ")
	ans=mult(int(I[0]),int(I[1]))+mult(int(I[1]),int(I[0]))	
	ans2=int(I[0])*int(I[1]);
	#print ans,ans2;
	gc=gcd(ans,ans2)
	print "%d/%d"%(ans/gc,ans2/gc);