#include <iostream>

using namespace std;

#define ll long long

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

    return 0;
}