

If square s1 = {{0, 2}, {2, 2}, {2, 0}, {0, 0}} and square s2 = {{4, 2}, {6, 2}, {6, 0}, {4, 0}}.

So, the two squares are shown in the above figure. The line that would cut these two squares in half has the equation y = 1. So the slope of the line is 0, and the y-intercept is 1. So, we return {0, 1} as the answer.
The first line contains an integer ‘T', which denotes the number of test cases or queries to be run. Then, the T test cases follow.
Four lines follow. Each line contains two space-separated integers, denoting the x and y-coordinates of vertices of the square s1 in clockwise order starting from the top left corner.
Then the next four lines follow. Each line contains two space-separated integers, denoting the x and y-coordinates of vertices of the square s2 in clockwise order.
For more clarity, please refer to the sample inputs.
For each test case, print a single line containing two space-separated numbers of type doubles denoting the slope and the y-intercept of the line, respectively, that would cut the squares in exactly half.
Your answer will be considered correct if the absolute or relative error of the numbers doesn’t exceed 10^-6.
The output for each test case will be printed in a separate line.
You do not need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 5000
-100 <= x-coordinate, y-coordinate of both squares <= 100
Time limit: 1 second
The line that bisects a square must pass through its centre. As there are two squares given in the problem, find the centre of both the squares. The line that passes through both these points is the desired answer. Note that there can be only one possible line that passes through both points. However, if the centre of both squares is the same point, then there can be infinitely many possible lines. So, we return {0, 0} in this case.