You would like to mail some origami you have made to your mom.
The price of mailing is dependent on the area of the envelope used to mail it: the smaller the envelope area, the less cost to ship. You cannot fold the origami shape to make it smaller. Of course, the envelope you are shipping the origami in must be rectangular.
Consider the vertices which represent the points along the boundary of the paper in order, such that the edge of the paper may fold over itself. Given the vertices describing the origami shape, what is the area of the smallest envelope that you can use to mail the origami?
Input Specification
The first line contains the integer which is the number of vertices describing your origami. The next lines contain two integers, , the -coordinate and -coordinate of that particular vertex . You should assume all vertices are distinct, and that there is no line which contains all vertices.
Output Specification
Output the area of the smallest envelope that will contain the origami, rounded to the nearest integer. You can assume that no test case will have the area of the smallest envelope containing the given vertices have a fractional part between and .
Sample Input
6
4 9
8 13
8 9
0 13
4 0
0 3
Output for Sample Input
104
David Pritchard, Troy Vasiga
Comments