A tangent to a circle is a line in the plane of a circle which intersects the circle in exactly one point. Two circles can have one or more than one common tangent(s).
A tangent of two circles is called a common internal tangent if the intersection of the tangent and the line segment joining the centers is not empty. For example AB and CD are common internal tangents in the picture.
A tangent of two circles is a common external tangent if the intersection of the tangent and the line segment joining the centers is empty. For example, EF and GF are common external tangents.
You are given two circles. Co-ordinates of center of one circle is (, ) and its radius is . Co-ordinates of center of the other circle is (, ) and its radius is .
If the circles have more than one common internal tangents, then you have to find the intersecting point of those tangents.
In the first line of input, an integer is given, the number of test cases. In each of the following lines, a test case is described with 6 integers: , , , , and .
Print the co-ordinates (, ) of the intersecting point of the common internal tangents.
For each test case, print the numbers and separated by a space in a single line. Print each number in format, where and are co-prime i.e. .
If number is 0, then print only 0, no need for format. If the point does not exist, just print in that line.
Print the answer for each test case in a separate single line.
Input | Output |
---|---|
1 3 6 2 20 3 4 | 26/3 5/1 |