Art Exhibition | 프로그래밍의 벗 PivotOJ
PivotOJ

Art Exhibition

시간 제한: 1000ms메모리 제한: 1024MB출처: EIO 2018-19 prelimBOJ 29944

문제

Once a year contestants from multiple countries gather to compete in the Best Olympiad in Informatics. Besides the competition, guests have an opportunity to visit local museums and landmarks. This year there will be an art exhibition specially made for the contestants and to appeal to such an audience every picture will be a collection of points with integer coordinates.

The coordinates of the points in every picture are already decided on and what's left is to print the pictures out. However, printing them on normal rectangular canvas is wasteful as a large part of the paper might not containt any points at all. To make the exhibition more eco-friendly, every canvas shall be a four-sided polygon with the top and bottom sides completely horizontal. The canvas must contain all points, but at the same time it must be as small as possible.

Your job is to write a program that outputs the minimum possible area of the canvas. Note that any side of the canvas can be infinitely small, making the canvas look like a triangle, line or even a point (in the last two cases the area is zero).

입력

The first line of input contains the number of points NN (1N1051 \le N \le 10^5). The next NN lines contain two numbers each: the coordinates xix_i and yiy_i of point ii, in picometers (108xi,yi108-10^8 \le x_i, y_i \le 10^8).

출력

On the only line of ouput, output the minimum possible area of the canvas. Your answer will be considered correct if it doesn't differ from the true answer by more than 0.0001%0.0001\%.

예제

예제 1

입력
6
0 3
1 1
4 1
3 0
3 2
0 0
출력
10.5

예제 2

입력
1
20 18
출력
0
코드를 제출하려면 로그인하세요.