It has been reported that something fell out of an aircraft approaching the airport over the bay. Thinking the object may have been some sort of contraband to be picked up by a confederate, the police want to watch for a repeat whenever any of the aircraft that could have been the one that dropped the object again approaches the airport over the bay. Three observation stations with night vision equipment have been stationed around the bay (see figure below).

Station is kilometers east and kilometers north of station and station is kilometers east and kilometers south of station .
When a suspect aircraft crosses the bay, each observer follows it with the night vision equipment while in contact with the other. If one observer sees something falling from the aircraft, each records a direction to the object and a confidence level for that direction. The confidence level (CL) is a value from (more or less pointing at the aircraft) to (pointing at the splash where the object hit the water).
In general, the three sight lines will not cross at a single point but will form a triangle (See Intersection Detail above). The best estimate of the actual position is to be the point (, ) which minimizes the sum of the squares of the distances d_i, to each line, weighted by the confidence level, CL_i + 0.2,
Minimize
For this problem, you will write a program which takes as input the three observer directions and the three confidence levels and outputs the point (, ), which minimizes the above sum, where is the distance in kilometers east of station and is the distance in kilometers north (positive) or south (negative) of station .
The first line contains the number of data sets (1 \leq p \leq 1000) that follow. Each data set should be processed identically and independently.
Each data set is a single line consisting of the data set number , followed by a space, and six space separated floating point values. The floating point values are, in order a_0, CL_0, a_1, CL_1, a_2, CL_2. a_i is the bearing (in degrees clockwise from north) from station (0 \leq a_i \leq 360) and CL_i is the confidence level of observer (0 \leq CL_i \leq 1).
For each data set there is one line of output. It contains the data set number, N, followed by a single space which is then followed by two space separated values and . is the distance east of station in kilometers, and is the distance north (positive) or south (negative) of station . The distances should be displayed to decimal places.
Example 1