 Timer is Running

Missing Point of a Parallelogram
##### Submissions: 185   Accuracy: 19.97%   Difficulty: Easy   Marks: 2

Given three coordinate points A, B and C, find the missing point D such that ABCD can be a parallelogram. There can be multiple such points, so print the lexicographically least coordinate.

Input:
The first line of input contains an integer T denoting the number of test cases. Each test case contains three lines for each of the point A, B and C with each line containing space separated integers Xi and Yi as coordinates for each of them.

Output:
Print two space separated coordinates of the required point with a precision of 6 decimal places.

Constraints:
1 <= T <= 100
1 <= x,y <= 1000 where x and y denote coordinates of points.

Example:
Input:

2
1 1
1 0
0 1
3 2
3 4
2 2
Output:
0.000000 0.000000
2.000000 0.000000

#### ** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Shashwat Jain
Author: shashwat jain

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.