from fractions import gcd

for t in range(0, input()):
    n, m = raw_input().split()
    n = int(n)
    m = int(m)

    num1 = n * m / 2
    
    num2 = n*m
    g = gcd(num1, num2)

    print "%i/%i" % (num1 / g, num2 / g)