In the event of technical difficulties with Szkopuł, please contact us via email at [email protected].
If you are familiar with IRC chat, the support team is also reachable on PIRC network (
#szkopul channel. If you are not, just use email.
Please do not ask us things like "how to solve task XYZ?".
Please remember that the support team has to sleep sometimes or go to work in real life.
This summer, Byteburg citizens are turning out in droves at the city beach down by the Byteotian Lake to experience the joy of sunbathing. Every Byteburg citizen arrives at the beach equipped with the blanket manufactured by Byteasar & Son, the trendiest this season. All blankets are of equal size (although different patterns), and each sunbather sets out his blanket in such a way that her blanket longer side is always perpendicular to the lake.
One of this year's sunbathers is professor Byteoni. After a few days of sunbathing professor noticed, that all the people who come to the beach always set out their blankets in their own favourite individual places, always the same. Although people come to the beach and leave it at different times, the professor never heard that any sunbather had taken over somebody's else's favourite place by putting the blanket there. This observation made the professor so curious, he decided to study this phenomenon.
For that purpose he set a coordinate system on the beach, and for every of the Byteburgians noted down the coordinates of each of the spots where individual citizens always put their blankets. The system is devised in such a way that the OX-axis is parallel to sides, and the OY-axis to sides of all of the blankets. The professor initially wanted to calculate the area of intersection of the areas occupied by the blankets for each pair of them. But then he realized that it is enough for further research that he has only the average of these values. In other words, he is interested in the expected value of the area of intersection of the fields occupied by blankets belonging to two different random people of Byteburg. Using the data provided by the professor, help him do the calculation.
The first line of input contains three integers , and (, ) indicating respectively the number of Byteburg inhabitants and the sizes of the blankets. Each of the subsequent lines contains two integers and () indicating the coordinates of the point where -th Byteburg citizen always puts the lower left corner of his blanket.
Your program should print one real number that represents the average area of intersection of the areas occupied by the blankets belonging to pairs of Byteburg inhabitants. Your result will be deemed valid if it is in the following range , where is the correct answer, and .
For the input data:
4 3 5 0 0 2 1 3 3 0 5
the correct result is:
Explanation of the example: The exact result is:
Task author: Jakub Łącki.