Prof. Pang will perform the following operation for times:
Select two intervals and from , and then choose two integers satisfying . After that, delete and from , and add to .
It's easy to find that contains exactly one interval after the operations, and Prof. Pang will get the interval as a gift.
Now Prof. Pang wants you to calculate how many different intervals he can get.
输入格式
The first line contains one integer (), the number of test cases.
For each test case, the first line contains one integer () --- the size of . Each of the following lines contains two integers and (), describing the -th interval in .
It is guaranteed that the sum of over all test cases is no more than .
输出格式
For each test case, output one line containing the answer to Prof. Pang's question.