#include <iostream>

typedef struct
{
	int a;
	int b;
} pair;

int main()
{
	int n;
	//get initial data
	std::cin >> n;
	
	pair pairArr[n]; //make array of size m for all the pairs
	for(int i = 0; i < n; i++) //read in pairs
	{
		std::cin >> pairArr[i].a >> pairArr[i].b;
	}
	
	for(int i = 0; i < n; i++)
	{
		std::cout << pairArr[i].a + pairArr[i].b << " " << pairArr[i].a - pairArr[i].b << " " << (long long int)pairArr[i].a * pairArr[i].b << "\n";
	}

	return 0;
}