#C1699. Maximum Rectangle Area
Maximum Rectangle Area
Maximum Rectangle Area
You are given four wooden fence pieces per test case. Your task is to determine the largest possible rectangular area that can be formed using these pieces. A valid rectangle can only be constructed if there are two pairs of equal-length sides. In other words, for four pieces with lengths \(a, b, c, d\), after sorting them, if \(a = b\) and \(c = d\), then the area of the rectangle is \(a \times c\). Otherwise, no valid rectangle can be formed and the answer is 0.
inputFormat
The first line contains a single integer \(t\) representing the number of test cases. Each of the following \(t\) lines contains four integers separated by spaces, representing the lengths of the wooden fence pieces for that test case.
outputFormat
For each test case, output a single line containing the maximum rectangular area that can be formed. If no rectangle can be formed, print 0.
## sample4
4 4 6 6
5 5 5 5
2 2 3 3
10 15 10 15
24
25
6
150
</p>