beecrowd | 3280
# Building Boundaries

**Timelimit: 1**

By Antti Laaksonen Finland

Maarja wants to buy a rectangular piece of land and then construct three buildings on that land.

The boundaries of the buildings on the ground must have rectangular sizes **a _{1}** ×

What is the minimum area of land Maarja has to buy?

Figure B.1: Illustration of the two test scenarios in Sample Input 1 and their solutions. In the second scenario the 5×1 building has been rotated by 90 degrees.

The input consists of multiple test scenarios. The first line of input contains a single integer **t** (1 ≤ **t** ≤ 1000), the number of scenarios. Then follow the t scenarios. Each scenario consists of a single line, containing six integers **a _{1}**,

For each test scenario, output the minimum area of land such that Maarja can construct the three

buildings.

Input Sample | Output Sample |

2 |
12 |