DS-S95-CA1-3

Time Limit: 1 Second    Memory Limit: 4096 KB

You can find the related question in the course page.

Input

there will be several test cases (t < 40). for each test case there will be 2 lines with the same format given in the CA's text . The end of test cases will achieve by zero n.

Output

For each test case, print maximum area of supposed rectangle.

Sample Input

7 2 1 4 5 1 3 3
4 120 120 120 120
0

Sample Output

8
480 
Submit