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

typedef long long ll;

int main() {
  int t; scanf("%d", &t);
  while (t--) {
    ll a, b;
    scanf("%lld%lld", &a, &b);
    printf("%lld %lld %lld\n", a+b, a-b, a*b);
  }
  return 0;
}