Frodo bought three birthday presents for Neo. Each present sits in its own rectangular gift box. Frodo wants to put all three gift boxes into a single rectangular wrapping box. A bigger wrapping box costs more, so he wants the one with the smallest area.
The size of the wrapping box depends on how the gift boxes are placed. The placement rules are:
For example, take gift boxes whose width × height is 3×4, 5×6, and 4×1. Placed as in the picture below, they need a wrapping box of size 8×8=64.

Placed as in the next picture, the same three boxes need only a wrapping box of size 5×10=50.

Given the sizes of the three gift boxes, find the smallest area of a wrapping box that safely holds all three.
The first line contains the number of test cases T (1≤T≤10000).
Each test case consists of three lines. Each line contains two integers A and B (1≤A,B≤50), the width and the height of one gift box, separated by a space.
For each test case, print on its own line the smallest area of a wrapping box that holds all three gift boxes.