Time limit
2s
Memory limit
128 MB
A building company called "Nemo" designs buildings around rectangles. On each floor, the outer wall is one rectangle, and the offices are the regions formed by drawing the borders of several rectangles inside that wall.
below shows the floor plan of one such floor. The outermost rectangle is the outside wall, and the four rectangles drawn inside it divide the interior into 7 offices.
Given the rectangle for the outside wall and the rectangles drawn inside it, write a program that computes the number of offices in the floor plan and the area of the largest office. Every rectangle side is parallel to one of the coordinate axes.
In <Figure 1>, the largest office is the shaded region shown in <Figure 2>.

The first line contains the number of rectangles N. (2 ≤ N ≤ 50,000)
Each of the next N lines contains four integers x1, y1, x2, and y2 describing one rectangle. (0 ≤ x1 < x2 ≤ 1,000,000,000, 0 ≤ y2 < y1 ≤ 1,000,000,000)
The upper-left corner of the rectangle is (x1, y1), and the lower-right corner is (x2, y2). One of the given rectangles is the outside wall that contains all the other rectangles. All vertex x-coordinates are distinct from one another, and all vertex y-coordinates are also distinct from one another.
Print two integers on one line: the number of offices formed by the given rectangles and the area of the largest office. Separate the two values with one space.
The number of offices is at most 1,000,000, and the largest office area is at most 4,200,000,000.