Union of rectangles 2#2922

Union of rectangles 2

1 second
122.486 megabytes
Very easy

Union of rectangles is much easier when their sides are parallel to the coordinate axes. Find the union of the given set of rectangles.

Input

The first line contains the number of rectangles (2 \leq n \leq 15). Each of the next lines gives the coordinates of opposite corners of one rectangle in the format x_1\ y_1\ x_2\ y_2. All coordinates are integers and belong to the segment [-10^9, 10^9].

The rectangles can be degenerate (that is, they may have zero area).

Output

Print the area of the union of the rectangles.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading

Example 4

Loading
Loading