There are multiple test cases. The first line of input contains an integer $T$, indicating the number of test cases. For each test case:
The first line contains a single integer $N$ denoting the number of apples in a tree.
Then $N$ lines follow, $i$-th of them contains two integers $H_{i}$ and $D_{i}$ indicating the height and deliciousness of $i$-th apple.
1 ≤ $T$ ≤ 48
1 ≤ $N$ ≤ 1000
1 ≤ $H_{i}$, $D_{i}$ ≤ $10^{9}$