#include<iostream>

using namespace std;

long long T, a, b, c;


int main(){		
	cin >>T;
	while(T--){
		cin >>a>>b;
		cout<<a+b<<" "<<a-b<<" "<<a*b<<endl;
	}
	return 0; 
}