Rectangles intersection#2592

Rectangles intersection

1 second
128 megabytes
Very easy

Two rectangles are given by the integer coordinates of a pair of diagonal vertices in a rectangular coordinate system. The sides of the rectangles are parallel to the axes. Find the area of the common part of the rectangles.

Input

Four pairs of integers are given. Each integer does not exceed 10^6 in absolute value.

Output

Print the area of the common part of the rectangles.

Examples

Example 1

Loading
Loading