#include <cstdio>

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