#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <math.h>
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <cassert>
#include <string.h>

#include <time.h>
#include <random>
#include <iomanip>
using namespace std;

#define ll long long
#define N 1000005


int main() {
    std::ios::sync_with_stdio(false);
    cin.tie(0);
    ll n;
    cin >> n;
    for (ll i = 0; i < n; i++) {
        ll a, b;
        cin >> a >> b;
        cout << a+b << " " << a-b << " " << a*b << endl;
    }


}