#-*- coding:utf-8 -*-

import sys
from fractions import Fraction


def main():
    sys.stdin.readline()
    for line in sys.stdin:
        ps = line.split()
        m = int(ps[0])
        n = int(ps[1])
        if m & 1:
            even_m = m >> 1
            odd_m = m - even_m
        else:
            print "1/2"
            continue

        if n & 1:
            even_n = n >> 1
            odd_n = n - even_n
        else:
            print "1/2"
            continue

        #odd_sum = Fraction(odd_m * even_n + even_m * odd_n, m * n)
        #even_sum = Fraction(even_m * even_n + odd_m * odd_n, m * n)
        print str(m * n / 2) + "/" + str(m * n)


if __name__ == '__main__':
    main()