{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe Babel fish is a rare and very useful creature, which saved Arthur Dent in his travels around the Galaxy more than once. If you insert it into your ear, you\u0027ll be able to understand representatives of any race in the Galaxy as if they spoke your own language.\r\n\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eUpon his return to the Earth, Arthur took the fish out of his ear and decided to keep it in case his friend Ford Prefect arrived unexpectedly and dragged him off on a new travel. Arthur thought it would be best to keep the fish in the tank the intelligent dolphins had given him. Then he would be able to have the tank with him even if he went far away from home in his car.\r\n\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe tank was a rectangular parallelepiped with a square base and open top. To control the amount of water in the tank, Arthur mounted a sensor for registering the water level at each of its four vertical edges.\r\n\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eSince the state of British country roads was far from ideal, the car tilted often and the water surface was not always parallel to the bottom of the tank, which produced unequal readings of the sensors. Arthur had to invent some method of calculating the amount of water in the tank.\r\n\u003c/div\u003e\u003c/div\u003e\u003cdiv class\u003d\"problem_centered_picture\"\u003e\u003cimg src\u003d\"CDN_BASE_URL/6c6acbbcaefa03c69edd45e76e8af094?v\u003d1725700479\" border\u003d\"0\" alt\u003d\"Problem illustration\"\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe first line contains the number of tests \u003ci\u003et\u003c/i\u003e (1 ≤ \u003ci\u003et\u003c/i\u003e ≤ 10\u003csup\u003e4\u003c/sup\u003e). In each of the following \u003ci\u003et\u003c/i\u003e lines you are given five integers: the length of the base square of the tank and the water levels at the vertical edges. All the integers are nonnegative and do not exceed 10\u003csup\u003e6\u003c/sup\u003e. The edges are described in the order shown in the figure.\r\n\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eFor each test output the volume of water in the tank if it is determined uniquely, “error” if the data are inconsistent, and “ambiguous” if the answer cannot be found uniquely. All the numbers should be given with absolute or relative error of at most 10\u003csup\u003e−6\u003c/sup\u003e.\r\n\u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\r\n10 2 3 4 3\r\n10 2 3 3 3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e300.000\r\nerror\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}