Union

Given N origin-centered axis-aligned rectangles, each by its width and height, compute the area of their union.

Medium7GeometrySortingNo attempts yetTime limit1sMemory limit256 MB

Problem

There are NN rectangles in the Cartesian plane. Every rectangle is centered at the origin, and its four sides are parallel to the coordinate axes. Each rectangle is therefore determined by its width (its length along the xx axis) and its height (its length along the yy axis). The figure below shows the first example.

Michuhol, a student in the design department, colored each rectangle and now wants to know the area of the colored part of the paper. In other words, find the area of the region that belongs to at least one rectangle (the union of all rectangles).

Input

The first line contains the number of rectangles NN (1N10000001 \le N \le 1\,000\,000).

Each of the next NN lines contains the width XX and the height YY of one rectangle. XX and YY are even integers (2X,Y1072 \le X, Y \le 10^7).

Output

Print the area of the colored region, that is, the area of the union of all rectangles, on a single line.