External Rectangles#710

External Rectangles

1 second
256 megabytes
Very easy

On a plane, there are rectangles drawn, each with vertices at integer coordinates and sides parallel to the coordinate axes. The boundaries of any two rectangles do not have any common points; that is, any two rectangles are either completely separate, or one is strictly contained within the other. In this context, some rectangles are called "external," meaning they are not contained within any other rectangle, and the rest are "internal." Find the number of "external" rectangles.

Input

The first line contains (1 \leq n \leq 10^5). Each of the next lines contains four integers x_1, y_1, x_2, y_2 (-10^9 \leq x_1, y_1, x_2, y_2 \leq 10^9), representing the coordinates of two opposite vertices of a rectangle.

Output

Print the number of "external" rectangles.

Examples

Example 1

Loading
Loading