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

typedef long long ll;

ll N, A, B;

int main() {
  ios::sync_with_stdio(0);
  cin.tie();

  cin >> N;
  while (N--) {
    cin >> A >> B;
    cout << A + B << " " << A - B << " " << A * B << endl;
  }

  return 0;
}