import java.util.Scanner;

public class io {
	public static void main (String [] args){
		Scanner scan = new Scanner (System.in);
		
		int tests = scan.nextInt();
		
		for (int i = 0; i < tests; i++){
			long a = scan.nextLong();
			long b = scan.nextLong();
			
			System.out.println((a + b) + " " + (a - b) + " " + (a * b));
		}
		scan.close();
	}
}