## Richmond Green P2 - LOL

View as PDF

Points: 3 (partial)
Time limit: 1.0s
Memory limit: 32M

Authors:
Problem type

Josh is playing his favorite game, Legal Legends. In the game, Josh has to command and select units, by drawing a rectangle that contains them. On Josh's screen, there are units, with the unit having the coordinates , Josh is lazy, and does not want to draw larger rectangles than he needs to. Help Josh figure out the minimum area of the rectangle required to contain all the units on his screen. A unit is considered contained in a rectangle if it is either inside the rectangle, or on one of its edges.

#### Input Specification

The first line contains the integer , the number of units on Josh's screen. The next lines contain integers each, the line containing , , the coordinates of the unit.

#### Output Specification

Output the minimum area required to contain Josh's units.

#### Sample Input 1

4
0 2
0 0
2 0
2 2

#### Sample Output 1

4

#### Sample Input 2

3
1 2
1 3
1 4

#### Sample Output 2

0