You plan to build a tree house in the woods near your house so that you can watch the sun rise and set.
You've obtained data from a local survey company that show the height of every tree in each rectangular section of the map. You need to analyze each grid on the map to find good trees for your tree house.
A good tree is both:
- taller than every tree to the east and west, so that you have the best possible view of the sunrises and sunsets.
- shorter than every tree to the north and south, to minimize the amount of tree climbing.