import java.util.Scanner;

 public class Main{

     public static void main(String[] args){


        Scanner scan = new Scanner(System.in);


        int i = scan.nextInt();

        while( i > 0){

        long a = scan.nextInt();
        long b = scan.nextInt();


        System.out.println((a + b) + " " + (a - b) + " " + (a * b));

        i--;


           }
        }




}