The input contains several test cases, no more than 10 test cases.
In each test case, the first line contains an integer $n(1\leq n\leq 3000)$, denoting the number of the classrooms.
In the following $n$ lines, each line contains two integers $x_i,c_i(-10^9\leq x_i,c_i\leq 10^9)$, denoting the coordinate of the $i$-th classroom and the cost of building a candy shop in it.
There are no two classrooms having same coordinate.