The first line of input consists of a single integer $T$ $(1 \leq T \leq 25)$, denoting the number of test cases.
Each test case starts with a line of a single integer $n$ $(1 \leq n \leq 10^6)$, the number of classes. For the next $n$ lines, each containing two integers $a, b$ $(0 \leq a, b \leq 10^9)$, denoting the number of students of the class and the number of cups of milk tea made by this class, respectively.
It is guaranteed that the sum of $n$ over all test cases does not exceed $6 \times 10^6$.