BETA

Difficulty Level: Easy

Total Submissions: 33 Accuracy:

0%

Missing Point of a Parallelogram
       

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

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.