import sys
tests=int(sys.stdjn.readline().split()(0))
for test in range(tests):
    numbers={int(i) for i in sys.stdin.readline().split()}
    n,m=numbers(o), numbers(i)

if (n%2==0) or (n%2==0):
    print (n*m // 2)
    else:
         print ((n*m+1)//2)
    
