문제2528--EXOCENTER OF A TRIANGLE

### 2528: EXOCENTER OF A TRIANGLE

실행시간 제한: 1 Sec  메모리사용 제한: 64 MB
제출: 4  통과: 1
[제출] [채점기록] [묻고답하기]

#### 문제 설명

Given a triangle ABC, the Extriangles of ABC are constructed as follows:
On each side of ABC, construct a square (ABDE, BCHJ and ACFG in the figure below).
Connect adjacent square corners to form the three Extriangles (AGD, BEJ and CFH in the figure).
The Exomedians of ABC are the medians of the Extriangles, which pass through vertices of the original triangle,extended into the original triangle (LAO, MBO and NCO in the figure. As the figure indicates, the three Exomedians intersect at a common point called the Exocenter (point O in the figure).
This problem is to write a program to compute the Exocenters of triangles.

#### 입력 설명

The first line of the input consists of a positive integer n, which is the number of datasets that follow. Each dataset consists of 3 lines; each line contains two floating point values which represent the (two -dimensional) coordinate of one vertex of a triangle. So, there are total of (n*3) + 1 lines of input. Note: All input triangles wi ll be strongly non-degenerate in that no vertex will be within one unit of the line through the other two vertices.

#### 출력 설명

For each dataset you must print out the coordinates of the Exocenter of the input triangle correct to four decimal places.

#### 입력 예시 Copy

2
0.0 0.0
9.0 12.0
14.0 0.0
3.0 4.0
13.0 19.0
2.0 -10.0

#### 출력 예시 Copy

9.0000 3.7500
-48.0400 23.3600