This page is still under construction.

Parts of this page are still being built. What you see may change.

Wedding Hall

Time limit1sMemory limit128 MB

Summary
Find the largest L-shaped hall of three equal squares that fits inside a walled garden without enclosing any tree.
Level

Hard8 of 10

Topics
Geometry, Binary search, Segment tree, Sorting
Solved
No attempts yet

Problem

Kamran has just bought a flat rectangular garden in a nice part of the countryside. The countryside has become a popular place for weddings, so he wants to build a hall for wedding ceremonies in the garden.

The law requires the men's section and the women's section to be separated, so Kamran plans a hall in three parts: a men's section, a women's section and a common section that holds the rest rooms, the dinner room and so on. Everyone has to reach the common section easily, so it goes between the other two. Of the several proposed designs Kamran picked the one in the figure below. The three sections are squares of the same size, they are attached to each other in an L shape, and their sides are parallel to the sides of the garden. The two sides of the common section that show from outside face the south and the west of the garden.

A hall of side ss whose lower left corner is at (x,y)(x, y) covers the union of three squares.

[x, x+s]×[y, y+s]  ∪  [x+s, x+2s]×[y, y+s]  ∪  [x, x+s]×[y+s, y+2s][x,\, x+s] \times [y,\, y+s] \;\cup\; [x+s,\, x+2s] \times [y,\, y+s] \;\cup\; [x,\, x+s] \times [y+s,\, y+2s]

The first square is the common section and the other two are the men's and the women's sections.

The remaining question is where to build the hall. The garden is full of old trees, and cutting a tree is forbidden because the air pollution is high. Kamran asks you to find the largest hall he can build.

Input

The input has several test cases. The first line of a test case holds an integer nn and two positive integers aa and bb (1≤n≤50 0001 \le n \le 50\,000, 1≤a,b≤1 000 0001 \le a, b \le 1\,000\,000). nn is the number of trees in the garden, and the garden is the rectangle [0,a]×[0,b][0, a] \times [0, b]. Each of the next nn lines holds the coordinates xix_i and yiy_i of one tree, separated by a space (0<xi<a0 < x_i < a, 0<yi<b0 < y_i < b). All coordinates are integers and no two trees share a position. The south side [0,a][0, a] of the garden lies on the xx axis and the west side [0,b][0, b] lies on the yy axis.

A line 0 0 0 ends the input and is not processed.

Output

For each test case, print the area of the largest hall Kamran can build on one line. The hall may touch a tree or a side of the garden but may not contain it in its interior, so a tree may sit on the boundary of the hall and the hall has to stay inside the garden.

Print the area with two digits after the decimal point. The side of the largest hall is always a multiple of 0.50.5, so the area is a multiple of 0.750.75 and two digits print it exactly.

Examples1

  1. Example 1

    Input
    2 3 5
    2 2
    1 4
    0 0 0
    
    Expected output
    6.75