Blocked Billboard II

Given two axis-aligned rectangles, find the smallest rectangle that covers the first billboard minus the part hidden by the second.

Easy3GeometryImplementationBrute forceMathInterviewNo attempts yetTime limit2sMemory limit512 MB

Problem

Bessie the cow used to enjoy the view from her barn. Across the road stood two billboards, and both advertised cow feed that looked delicious. One of them was repainted recently, and it now advertises Farmer Larry's Lawnmowers. Bessie dislikes lawnmowers, because as far as she can tell their only purpose is cutting down the tasty grass in her field.

The remaining cow feed billboard sits in front of the lawnmower billboard, so it hides part of it.

Bessie decided to remove the lawnmower billboard from her view for good. She plans to take a large rectangular tarp from the barn and sneak out late at night to cover whatever part of the lawnmower billboard she can still see.

Given the positions of the two billboards, compute the minimum area of the tarp Bessie needs. The barn only holds rectangular tarps, so she may need a tarp larger than the visible part of the lawnmower billboard. The tarp may only be placed with its sides parallel to the sides of the billboards, so it cannot be tilted.

Input

The first line contains four space separated integers x1x_1 y1y_1 x2x_2 y2y_2, where (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) are the lower left and upper right corners of the lawnmower billboard in Bessie's two dimensional field of view. The second line contains the lower left and upper right corners of the cow feed billboard in the same format. The cow feed billboard may hide all of the lawnmower billboard, part of it, or none of it. Every coordinate is between -1000 and 1000.

Output

Print the minimum area of the tarp Bessie needs so that no part of the lawnmower billboard stays visible.

Note

In the first example the cow feed billboard hides the lower right corner of the lawnmower billboard. That does not help Bessie. She still needs a tarp as large as the entire lawnmower billboard.