CF2061B Kevin and Geometry
Description
Kevin has $ n $ sticks with length $ a_1,a_2,\ldots,a_n $ .
Kevin wants to select $ 4 $ sticks from these to form an isosceles trapezoid $ ^{\text{∗}} $ with a positive area. Note that rectangles and squares are also considered isosceles trapezoids. Help Kevin find a solution. If no solution exists, output $ -1 $ .
$ ^{\text{∗}} $ An [isosceles trapezoid](https://en.wikipedia.org/wiki/Isosceles_trapezoid) is a convex quadrilateral with a line of symmetry bisecting one pair of opposite sides. In any isosceles trapezoid, two opposite sides (the bases) are parallel, and the two other sides (the legs) are of equal length.
Input Format
Each test contains multiple test cases. The first line contains the number of test cases $ t $ ( $ 1 \le t \le 10^4 $ ). The description of the test cases follows.
The first line of each test case contains a single integer $ n $ ( $ 4 \le n \le 2\cdot 10^5 $ ).
The second line contains $ n $ integers $ a_1, a_2, \ldots, a_n $ ( $ 1 \le a_i \le 10^8 $ ).
It is guaranteed that the sum of $ n $ over all test cases does not exceed $ 2\cdot 10^5 $ .
Output Format
For each test case, output $ 4 $ integers — the lengths of sticks. If no solution exists, output $ -1 $ .
If there are multiple solutions, print any of them.
Explanation/Hint
In the first test case, you can form an isosceles trapezoid with bases of length $ 5 $ and $ 10 $ , and two legs of length $ 5 $ .
In the second test case, you can form an isosceles trapezoid with two bases of length $ 5 $ and two legs of length $ 10 $ . A rectangle is considered an isosceles trapezoid here.
In the third test case, there are no sticks with the same length. It's impossible to form an isosceles trapezoid.
In the fourth test case, it's impossible to form an isosceles trapezoid with a positive area.