#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef vector<int> vi;

#define endl '\n'

int main() {
	ios::sync_with_stdio(0);
	ll t; cin >> t;
	while(t--) {
		ll a,b; cin >> a >> b;
		cout << a+b << " " << a-b << " " << a*b << endl;
	}
	return 0;
}