URI Online Judge | 1857

Prelude of a Red Wedding

By Leandro Zatesko, UFFS BR Brazil

Timelimit: 1

Few people know that, in the series of events preceding the bloody Red Wedding, Lord Frey promised Robb Stark a part of the Riverlands' territory, and also a mansion. The very words that Lord Frey told Robb Stark, in a meeting at the Twins, were:

— Here is the map of the Riverlands and of all the buildings which exist in them. Put a nail on the location where you wish your mansion be built. Choose any location you want, unless it lies over or at the north of an already existing building. Yet, if the location you choose lies at the same latitude of other building, this other building must be further east than your location.

So proceeded Robb Stark. Lord Frey, then, continued:

— Take now these other nails and put them on already existing buildings, and they shall belong to you too. Choose whatever buildings you wish. Know that, after finishing, I shall stretch this rubber band around all the map and I shall let it go, so that the nails stop it. All the territory on the boundary or in the interior of the region defined by the rubber band shall be yours. However, do not abuse my benevolence. If the area of your territory exceeds B square metres, I will cut your head off right here.

Robb did his choice in order to own the largest possible area of land keeping his head, at least for a while. Can you guess the area that he obtained?


The first line of the input consists of two integers, N and B (0 ≤ N < 100, 1 ≤ B ≤ 103), which respectively represent the number of already existing buildings in the map and the limit for the area of Robb Stark's territory set by Lord Frey. The second line consists of two integers, Xm and Ym (0 ≤ Xm, Ym ≤ 104), which respectively represent the latitude and the longitude of the location that Robb chose for the construction of his mansion. Each one of the N lines following consists of two integers X and Y (0 ≤ X, Y ≤ 104), which respectively represent the latitude and the longitude of each building.


Print a line containing only the exact value of the area of the land that Robb Stark received, without unnecessary leading or trailing zeros.

Input Samples Output Samples

5 19
5 1
4 7
1 4
8 2
7 5
8 8


5 10
0 0
1 0
3 0
3 3
2 5
0 3