The first line of the input gives the number of test cases, T(1≤T≤100). Ttest cases follow.
For each test case, the first line contains an integer n(1≤n≤105), the number of reports.
Then nlines follow, the ithof which contains two integers ti,xi(1≤ti,xi≤109), representing that there's at least one student at position xi(m)at time ti(s).
The sum of nin all test cases doesn't exceed 5×105.