You are given a rectangle which is parallel to the coordinate axis. The lower left coordinate is and the length of two sides are and (described in the figure). You can easily construct the rectangle by connecting these 4 points , , , in anti-clockwise order.
Figure: A line drawn form dividing the rectangle into two equal parts (according to area). Note that, the figure may not be mathematically accurate. It is used just for understanding purposes.
Now, from a given point, you have to draw a line, such that the given line divides the rectangle into two parts of equal area.
The first line of the input file contains () which denotes the number of test cases. Each of the next lines will contain 6 floating point numbers , , , , and () where is the lower left coordinate of the rectangle, and is showed in the figure and is the point from where we need to draw the line.
Output the intersected points of the drawn line and the sides of the rectangle. Print the points in lexicographical order. No two points in the output will be same.
For judging purpose error less than will be ignored.
Input | Output |
---|---|
1 0 0 6 6 3 -1 | 3 0 3 6 |
The dataset of this problem is designed in such a way that there will never be infinitely many solutions.