Dane use Black pen to draw rectangle on the white paper, each rectangle's width is 1 and it's height is h. Assume all the rectangles' bottom edges are on the same level. Please find the maximum rectangle which is full black.
Input contains multiple test cases. Each case starts with an integer n(1 <= n <=10^5), the number of rectangles on the paper.
The next n lines contains two integers each. x is the position and h is the height(1 <= x <= 10^5, 1 <= h <= 1000). Note x and x+1 is adjacent, and don't have the same x
For each test case, output the maximum area.
4 1 10 3 3 4 3 5 3 3 1 3 2 4 3 4
10 9