The cows have decided they simply must have a swimming pool for next summer. Furthermore, they have decided on a shape: they want an "L"-shaped pool. They will be putting this pool in a forest near their pastures and wish not to remove any trees. You will be given the size of the forest (W width by H high) and a set of N tree locations. Find the largest (by area) possible pool that can be put into the forest.
Here's an example grid and forest with the largest pool:
. . * . . . . . . * . . . .
* . . . . . . * P P . . . .
. . . * * * . . P P * * * .
. . . . . . . . P P . . . .
* . . * . * . -> * P P * . * .
. . . . . . . . P P P P P .
. . . . . . . . P P P P P .
* . . . . . * * P P P P P *
. . * . * . . . . * . * . .
The largest pool covers 23 gridpoints.
Note the distinctive "L" shape of the pool. The "L" shape is formed by combining two rectangles that share the lower left hand part of the "L" shape. The lower bar of the "L" must be wider than the upper part of the "L". Likewise, the upper part of the "L" must be taller than the lower bar. The "L" shape is never rotated or reflected. A simple rectangle is not an "L" shape.
A single line with the number of gridpoints of the largest possible pool that can be built.