T = int(raw_input())
while T>0:
  case = raw_input()
  nos = case.split()
  N = int(nos[0])
  M = int(nos[1])
  if (M * N) % 2 == 0:
    print '1/2'
  else:
    X = M * N
    print str((X - 1) / 2) + '/' + str(X)
  T = T - 1