count

John designs the following lower triangular matrix :

1 0 0 0 0 0 ...
2 2 0 0 0 0 ...
3 3 3 0 0 0 ...
4 4 4 4 0 0 ... 
5 5 5 5 5 0 ... 
6 6 6 6 6 6 ...
and so on ...

He represented this matrix as [R , C] , where R is the number of rows and C is the number of columns in the matrix.

Now he provides any random R and C to Ricky and asks him to tell the count of even and odd numbers in the matrix respectively.

Note: 0 is neither even nor odd.

Input:

First line contains number of test cases T.Each test case contains two integers R and C.

Output

For each test case  print count of even and odd numbers in  matrix [R,C].

Constraints:

1 ≤ T ≤ 100000

1 ≤ R ≤ 100000

1 ≤ C ≤ 100000

SAMPLE INPUT
3
2 3
6 7
10 10

SAMPLE OUTPUT
2 1
12 9
30 25

Source: hackerearth | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
#!usr/bin/python

t = eval(input());
while(t > 0):
	r, c = list(map(int, input().split())); e = 0; o = 0;
	while(r > 0):
		if(r % 2 == 0):	e += min(r, c);
		else: o += min(r, c);
		r -= 1;
	print(e, o, end = '\n', sep = ' ');
	t -= 1;


for _ in range(int(input())):
	r,c=list(map(int,input().split()))
	x=0
	y=0
	for i in range(1,r+1):
		if i%2:
			y+=min(c,i)
		else:
			x+=min(c,i)
	print(x,y)


# cook your code here
import os
import math


test=int(input())

for _ in range(test):
	r,c=list(map(int,input().split()))
	Even=0
	Odd=0
	temp =int(r/2)*2
	while (temp>=2):
		if(c<temp):
			Even=Even+c
		else:
			Even=Even+temp
		temp=temp-2
	print((Even), end=' ')
	if(r%2==1):
		temp=r
	else:
		temp=r-1
	while(temp>=1):
		if(c<temp):
			Odd=Odd+c
		else:
			Odd=Odd+temp
		temp=temp-2
	print (Odd)   
	


   


n = eval(input())


for _ in range(n):
	row,col = list(map(int,input().split()))
	odd_s = 0
	even_s = 0
	for each in range(1,row+1):
		if each%2==0:
			if col <= each:
				even_s += col
			else:
				even_s += each
		else:
			if col <= each:
				odd_s += col
			else:
				odd_s += each
	print(even_s,odd_s)


tc=int(input())
while tc>0:
	tc-=1
	R,C=list(map(int,input().split()))
	#print R,C
	o=0
	e=0
	#for i in xrange(1,R+1):
	#	for j in xrange(1,C+1):
	#		if j<=i:
	#			if i%2==0:
	#				e+=1
	#			else:
	#				o+=1
	#		else:
	#			break
	#print 'e,o',e,o
	#print e,o
	for i in range(1,R+1):
		if i%2==0:
			if i<=C:
				e+=i
			else:
				e+=C
				
		else:
			if i<=C:
				o+=i
			else:
				o+=C
	print(e,o)
	


def odd(size):
	return ((size+1)/2) ** 2

def even(size):
	size /= 2
	return size ** 2 + size

for _ in range(int(input())):
	r, c = list(map(int, input().strip().split()))
	
	if r <= c:
		print(even(r), odd(r))
	else:
		diff = r - c
		if c % 2 == 0:
			odd_length = (diff+1) / 2
			even_length = diff / 2
		else:
			odd_length = diff/2
			even_length = (diff+1)/2
		
		odds = odd_length * c
		evens = even_length * c
		
		print(even(c) + evens, odd(c) + odds)