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

0.000000 0.000000

2.000000 0.000000

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.

bruceewayne | 175 |

manvirag982 | 158 |

Core_Ka_Bachha | 137 |

yash_sharan | 136 |

rajupraaa1234 | 133 |

mr_kksparrow | 433 |

manvirag982 | 374 |

rajupraaa1234 | 268 |

Exception_404 | 254 |

PranathiBhuvanagiri | 242 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4567 |

Login to report an issue on this page.