#GYM104720K. Donut Rings

Donut Rings

本题没有可用的提交语言。

Description

Emily is a famous donut chef, known worldwide for her critically acclaimed donuts of varying sizes. Being at the forefront of donut development, Emily has come up with an idea for a new donut creation: nesting donuts within other donuts! Emily currently has $n$ donuts, the $i$th of which can be described by two integers $r_i$ and $R_i$, denoting the inner and outer radius of the donut — the area between the circles of radius $r_i$ and $R_i$ being the donut itself, and the area within the circle of radius $r_i$ being the empty space making up the hole of the donut. A donut can be nested within another donut if it can fit within the hole of the other donut; in other words, if its outer radius is less than or equal to the inner radius of the other donut. Emily would like to take some of her donuts and nest them within each other to form a series of concentric donuts, which she is calling a "donut ring".

Some examples of valid and invalid donut rings:

$\color{green}{\text{Valid}}$.$\color{red}{\text{Invalid}}$. The donuts are not nested.$\color{red}{\text{Invalid}}$. The donuts are not concentric.

Obviously, critics would be pleased by a donut ring that contains a large amount of donut, but too much empty space inside the ring detracts from the presentation as well! To this end, define the beauty of a donut ring as the area of the donuts in the ring, minus the area of the empty space contained in the ring.

Emily has high expectations for her creations, so she wants to create a donut ring with the greatest beauty. Unfortunately, she has specialized too much in donut making and neglected her studies in donut math, so she has turned to you for help! Can you help Emily find the maximum beauty of a donut ring that she can make? Output this value divided by $\pi$.

The first line of input contains a single integer $n$ $(1\leq n\leq10^5)$ — the number of donuts Emily has.

The $i$th of the next $n$ lines contain two integers, $r_i$ and $R_i$ $(1\leq r_i < R_i \leq 10^9)$, denoting the inner and outer radius of the $i$th donut.

Output a single integer, the maximum beauty of a donut ring that Emily can make divided by $\pi$.

Input

The first line of input contains a single integer $n$ $(1\leq n\leq10^5)$ — the number of donuts Emily has.

The $i$th of the next $n$ lines contain two integers, $r_i$ and $R_i$ $(1\leq r_i < R_i \leq 10^9)$, denoting the inner and outer radius of the $i$th donut.

Output

Output a single integer, the maximum beauty of a donut ring that Emily can make divided by $\pi$.

3
1 2
2 3
3 4
1
75 100
5
9 10
6 7
3 7
1 6
15 16
14
-1250
47

Note

In the first example, the Emily can use all three donuts to create a donut ring, with donut area $15\pi$ and enclosed empty space of $\pi$, resulting in a beauty of $14\pi$.

In the second example, Emily only has one donut, so the only donut ring she can make is comprised of just that donut with donut area $4375\pi$ and enclosed empty space of $5625\pi$, resulting in a beauty of $-1250\pi$.