Rectangles
Time limit1sMemory limit512 MB
Find the integer point B on the top or right edge so that segment AB from the origin crosses the most of N axis-parallel rectangles.
Problem
There are N rectangles on the plane. Their sides are parallel to the coordinate axes. The rectangles may overlap, coincide, or lie inside one another. Their vertices have non-negative integer coordinates, where x coordinates do not exceed and y coordinates do not exceed .
A segment starts at and ends at point . The coordinates of satisfy these conditions:
- has integer coordinates.
- lies on the segment or on the segment .
Segment crosses a rectangle even if it touches only one of its vertices.
Find a point for which segment crosses as many rectangles as possible.

The figure shows 8 rectangles. Segment crosses 5 of them.
Input
The first line contains three integers , () and (). Each of the following N lines contains four integers , , , , the coordinates of the bottom left corner and the top right corner of a rectangle. Adjacent numbers are separated by a single space.
Output
Print one line with three integers. The first is the maximum number of rectangles crossed by segment . The second and third are the x and y coordinates of point . If several answers exist, print any of them.
Hint
Another possible answer is 5 22 11.