Limits 1s, 1.0 GB

You will be given an isosceles right angled triangle. The legs of the triangle have a length of LL and lies along the positive XX axis and YY axis. You can assume that the coordinates of the three vertices of the triangle are (0,0)(0, 0), (L,0)(L, 0) and (0,L)(0, L).

Your task is to divide the triangle into two sections of equal area by drawing a straight line segment starting from a point on the perimeter to another point on the perimeter of the triangle.

However, there is a small twist. You cannot just draw the line from any point. You will be given the starting point of the segment on the perimeter. You have to find the coordinate of the other end of that segment.

Input

The first line contains an integer TT (T1000T ≤ 1000), the number of test cases. For each test case, there are three integers, LL, xx, yy. Here, LL (1L1000001 ≤ L ≤ 100000) is the length of the legs, and (x,y)(x, y) is the coordinate of starting point of the segment.

Output

For each case, print the coordinate of the other end point of the segment. An error lower than 10410^{-4} will be ignored by the judge. Check sample input and output section for formatting.

Sample

InputOutput
2
250 0 0
250 0 40
125.000000 125.000000
148.809524 101.190476

Submit

Login to submit.

Statistics

74% Solution Ratio
sarwarITEarliest, Apr '18
adnan_tokyFastest, 0.0s
sarwarITLightest, 131 kB
mdvirusShortest, 302B
Toph uses cookies. By continuing you agree to our Cookie Policy.