Time limit
1s
Memory limit
128 MB
A rectangular village farmland is divided by several straight-line embankments. To manage the fields and farming more efficiently, the village wants to rearrange the fields into rectangles of equal area. Before doing that, it must know the exact area of each field in the current division.

You are given the width and height of the whole farmland, w and h, and for each embankment the coordinates of its two endpoints (x1, y1) and (x2, y2). The lower-left corner of the whole rectangle is (0, 0), and the upper-right corner is (w, h).
Assume that embankments have area 0. Write a program that finds the area of the largest field among all divided fields. In the figure, the shaded field has area 13.
The first line contains two integers w and h, the width and height of the whole farmland. (1 <= w, h <= 20,000)
The second line contains an integer N, the number of embankments. (1 <= N <= 4,000)
Each of the next N lines contains four integers x1, y1, x2, and y2, the coordinates of the two endpoints of one embankment. (0 <= x1, x2 <= w, 0 <= y1, y2 <= h)
No two segments meet except possibly at their endpoints.
Output the area of the largest field among the given division. Print the area with exactly one digit after the decimal point.