for _ in xrange(int(raw_input())):
    n, m = map(int, raw_input().split(" "))
    
    if not n&1:
        print "1/2"
        continue
    
    if not m&1:
        print "1/2"
        continue
    
    print str(m * n/2) + "/" + str(m * n)