def mainFunc():
    cases = input()
    for i in range(cases):
        (a, b) = tuple(int(x) for x in raw_input().split(' '))
        print a + b, a - b, a * b

mainFunc()