403175: GYM101061 D Max or Min .. that is the question!
Description
Omar is a very lucky person. One day he found an array of five integers in the middle of the street!
Because Omar loves pre-calculations, he looked at the numbers and immediately marked the maximum number and the minimum number among them, just in case someone asked him about such information!
The next day people started asking questions about the array. Most people asked about the maximum number and the minimum number as expected, but one question was beyond all Omar's expectations! The question was: "what is the maximum number we can get from choosing two distinct numbers from the array, such that their multiplication is as large as possible ?"
It's a sure thing that Omar can easily calculate this information, but as everyone knows .. he is a very busy person. Can you help him answering the question?
InputThe first line of the input contains T the number of test cases.
Each test case is represented with five integers on a single line separated by spaces, the numbers that Omar found. All numbers are positive, distinct integers and less than 1000.
OutputFor each test print one integer. The answer to the question above.
ExampleInput2Output
1 2 3 4 5
50 40 30 20 10
20
2000