You are given a coordinate plane and three integers $$$X$$$, $$$Y$$$, and $$$K$$$. Find two line segments $$$AB$$$ and $$$CD$$$ such that
Note that it's not necessary for segments to intersect. Segments are perpendicular as long as the lines they induce are perpendicular.
The first line contains a single integer $$$t$$$ ($$$1 \le t \le 5000$$$) — the number of test cases. Next, $$$t$$$ cases follow.
The first and only line of each test case contains three integers $$$X$$$, $$$Y$$$, and $$$K$$$ ($$$1 \le X, Y \le 1000$$$; $$$1 \le K \le 1414$$$).
Additional constraint on the input: the values of $$$X$$$, $$$Y$$$, and $$$K$$$ are chosen in such a way that the answer exists.
For each test case, print two lines. The first line should contain $$$4$$$ integers $$$A_x$$$, $$$A_y$$$, $$$B_x$$$, and $$$B_y$$$ — the coordinates of the first segment.
The second line should also contain $$$4$$$ integers $$$C_x$$$, $$$C_y$$$, $$$D_x$$$, and $$$D_y$$$ — the coordinates of the second segment.
If there are multiple answers, print any of them.
41 1 13 4 14 3 33 4 4
0 0 1 0 0 0 0 1 2 4 2 2 0 1 1 1 0 0 1 3 1 2 4 1 0 1 3 4 0 3 3 0
The answer for the first test case is shown below:
Name |
---|