시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
6 초 128 MB 496 117 41 25.153%

문제

n개의 점이 주어졌을 때, 3개의 점으로 만들 수 있는 삼각형들 중 가장 큰 삼각형과 가장 작은 삼각형을 찾아라.

입력

각 테스트 케이스는 정수 n(3 ≤ n ≤ 2,000) 으로 시작하며 n은 점의 개수를 나타낸다. 다음 n줄에는 점의 좌표를 나타내는 두 개의 정수 x, y (-10,000 ≤ x, y ≤ 10,000)가 주어진다. 각 테스트 케이스에는 중복되는 점이 없다. 입력의 마지막은 하나의 0만 주어진다.

출력

각 테스트 케이스에 대해, 각 줄에 3개의 점으로 만들 수 있는 삼각형 중 가장 작은 삼각형과 가장 큰 삼각형의 넓이를 차례로 출력해라. 출력할 때에는, 소수점 한자리까지 나타내야 한다.

예제 입력 1

4
-5 -5
-4 3
4 1
3 -2
7
1 0
2 0
0 2
2 3
0 1
3 0
0 3
0

예제 출력 1

10.5 33.0
0.0 4.0
W3sicHJvYmxlbV9pZCI6Ijk0ODQiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWNkNWNcdWIzMDBcdWMwYmNcdWFjMDFcdWQ2MTUsIFx1Y2Q1Y1x1YzE4Y1x1YzBiY1x1YWMwMVx1ZDYxNSIsImRlc2NyaXB0aW9uIjoiPHA+blx1YWMxY1x1Yzc1OCBcdWM4MTBcdWM3NzQgXHVjOGZjXHVjNWI0XHVjODRjXHVjNzQ0IFx1YjU0YywgM1x1YWMxY1x1Yzc1OCBcdWM4MTBcdWM3M2NcdWI4NWMgXHViOWNjXHViNGU0IFx1YzIxOCBcdWM3ODhcdWIyOTQgXHVjMGJjXHVhYzAxXHVkNjE1XHViNGU0IFx1YzkxMSBcdWFjMDBcdWM3YTUgXHVkMDcwIFx1YzBiY1x1YWMwMVx1ZDYxNVx1YWNmYyBcdWFjMDBcdWM3YTUgXHVjNzkxXHVjNzQwIFx1YzBiY1x1YWMwMVx1ZDYxNVx1Yzc0NCBcdWNjM2VcdW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