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

typedef long long ll;

#define endl '\n'

int main() 
{
  ios::sync_with_stdio(0);
  ll test_counter;
  cin >> test_counter;

  for (ll i = 0; i < test_counter; i++) {
    ll a,b;
    cin >> a >> b;
    cout << a+b << " " << a-b << " " << a*b << endl;
  }
  return 0;
}