시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
10 초 128 MB 80 13 10 32.258%

문제

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+blx1YWMxY1x1Yzc1OCBcdWM4MTBcdWM3NzQgXHVjOGZjXHVjNWI0XHVjODRjXHVjNzQ0IFx1YjU0YywgM1x1YWMxY1x1Yzc1OCBcdWM4MTBcdWM3M2NcdWI4NWMgXHViOWNjXHViNGU0IFx1YzIxOCBcdWM3ODhcdWIyOTQgXHVjMGJjXHVhYzAxXHVkNjE1XHViNGU0IFx1YzkxMSBcdWFjMDBcdWM3YTUgXHVkMDcwIFx1YzBiY1x1YWMwMVx1ZDYxNVx1YWNmYyBcdWFjMDBcdWM3YTUgXHVjNzkxXHVjNzQwIFx1YzBiY1x1YWMwMVx1ZDYxNVx1Yzc0NCBcdWNjM2VcdWM1NDRcdW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