#P10251. 农场
农场
Background
Join mc2b2t.com, thanks meow.
upd:

Problem Description
ZHY wants to manage his farm.
Specifically, he has farm plots. Each plot is a rectangle whose four sides are all parallel to the coordinate axes. These plots may overlap.
Now he wants to fence off a piece of land to maintain his farm. He wants this land to completely cover all farm plots. For convenience, he also wants this land to be a rectangle whose four sides are parallel to the coordinate axes. He wants to minimize the area of this rectangle.
Because he has too many farm plots, he asks you for help. You need to output the area of this rectangle.
Input Format
The first line contains a positive integer .
In the next lines, four integers are given, meaning there is a farm plot whose two diagonal vertices are and .
Output Format
Output one integer, the minimum area of the fenced land.
2
1 0 2 3
-1 1 3 2
12
Hint
Sample explanation: as shown in the figure below, green is the first farm plot and red is the second. It is easy to see that the minimum fenced area is .

Constraints:
For of the testdata, .
For of the testdata, , , , .
Translated by ChatGPT 5