from fractions import Fraction
for _ in xrange(int(raw_input())):
    n, m = map(int, raw_input().split(" "))
    
    if n&1:
        n_e = n>>1
        n_o = n - n_e
    else:
        print "1/2"
        continue
    
    if m&1:
        m_e = m>>1
        m_o = m - m_e
    else:
        print "1/2"
        continue
    
    print str(m * n/2) + "/" + str(m * n)