Bohemian Rhaksody
시간 제한6.5초메모리 제한1024 MB
N개의 전구가 각각 x≤X, x≥X, y≤Y, y≥Y 중 하나의 반평면을 비출 때, 모든 전구가 비추는 영역의 넓이가 최대가 되도록 각 전구의 방향을 정한다.
문제
MolaMola is a world-famous rock band composed of three members: Guitarist Sangsoo cki86201 Park famous for his amazing performance with Link-cut tree, drummer Sunggwan dotorya Park who plays 5 problems in 10 minutes without single WA, and the vocalist Bumsoo zlzmsrhak Park who is responsible for the impressive outlook of the band. The movie about their story, Bohemian Rhaksody, became a blockbuster in Korea, and they are preparing for their perfect comeback concert.
Bumsoo, famous for his unique sense of fashion, thinks that perfect concerts need not only the best music but also great visual effects. Needless to say, the illumination setting is a very important matter for him.
The stage given to them is a size rectangle with four corners in , and there are bulbs already installed in the stage. Note that the bulbs may lie on the boundary, but are not strictly outside. To prevent interference, each bulb has a distinct -coordinate, and each bulb also has a distinct -coordinate. Every bulb is designed to light either the east/west/south/north part of the stage. More formally, the bulb at the coordinate can be operated in one of the following modes:
- Light the area of the stage where .
- Light the area of the stage where .
- Light the area of the stage where .
- Light the area of the stage where .
Bumsoo wants their band to play in the brightest area, so the stage will be exactly the area that is lit by all bulbs. Now, Bumsoo wants to find a way to operate the bulbs, in order to maximize the area of their stage. Help him!
입력
The first line contains three integers . ()
In the next lines, two integers are given, indicating that the bulb is installed in coordinate . ()
It is guaranteed that no pair of different bulbs share an -coordinate, and no pair of different bulbs share a -coordinate.
출력
Print the maximum possible area that can be lit by all bulbs.