시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 80 21 12 23.529%

문제

유클리드는 자신의 공책에 다음과 같은 문제를 풀기 위한 복잡한 과정을 적어놓았다. 하지만, 컴퓨터를 이용하면 쉽게 구할 수 있다.

이차원 평면 위에 선분 AB와 점 C, 삼각형 DEF가 있다. 점 C는 선분 AB위에 있지 않다. 이 때, 다음과 같은 점 G와 H를 찾아야 한다.

1. H는 점A에서 C로 뻗어가는 반직선 위에 있다. 

2. ABGH는 평행사변형이다.

3. 평행사변형 ABGH의 넓이는 삼각형 DEF의 넓이와 같다.

입력

입력은 여러 개의 테스트 케이스로 이루어져 있다. 각 테스트 케이스는 12개의 실수로 이루어져 있다. 이 실수는 모두 소수점 3자리를 넘지 않는다.

AX AY BX BY CX CY DX DY EX EY FX FY

A의 좌표는 (AX,AY), B의 좌표는 (BX,BY)이고 나머지 점도 이와 같은 식이다. 점 A,B,C는 모두 겹치지 않으며, D,E,F도 마찬가지다. 모든 숫자는 -1000.0와 1000.0을 포함하는 구간에 있다. 입력의 마지막은 12개의 0.0으로 이루어져 있다.

출력

각각의 테스트 케이스에 대해서 4개의 실수를 출력한다. 점 G와 H의 좌표를 다음과 같은 형식으로 출력한다.

GX GY HX HY

G의 좌표는 (GX,GY), H의 좌표는 (HX,HY)이고, 모두 소수점 넷째자리에서 반올림해서 셋째자리까지 출력해야 한다. 각각의 숫자 사이에는 빈 칸을 출력한다.

예제 입력 1

0 0 5 0 0 5 3 2 7 2 0 4
1.3 2.6 12.1 4.5 8.1 13.7 2.2 0.1 9.8 6.6 1.9 6.7
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

예제 출력 1

5.000 0.800 0.000 0.800
13.756 7.204 2.956 5.304
W3sicHJvYmxlbV9pZCI6IjQxMDUiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM3MjBcdWQwNzRcdWI5YWNcdWI0ZGMiLCJkZXNjcmlwdGlvb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