The Sacrificial Firepits
The fire sacrifice at the end of the Mahabharata war required the drawing of two large equilateral triangles on the ground representing Yantras, in which two huge firepits were built up. The royal priests determined the size of the triangles, but their orientation and positions were freely changeable, although they could not overlap (their edges can touch each other though).
Since rain was predicted on the day of the sacrifice, Yudhishthira, the new king, ordered a hastily constructed shelter to be built along with the firepits. To save time, the shelter had to be rectangular in design and of minimal area needed to cover both triangles completely.
Tell Yudhishthira, using your considerable skill in Vedic mathematics, what the minimum area of the rectangle should be.
The first line contains the number of test cases T. Each of the next T lines contains two integers S1 and S2, denoting the sides of the two equilateral triangles.
For each test case, output the answer rounded to 3 decimal places.
T <= 1000
1 <= S1, S2 <= 100
To print correct to 3 decimal places (for printing a double variable sol):
Problem Source : ACM ICPC Asia Amritapuri Onsite Regionals 2013
Problem Tester : Shikhar Sharad