Darshil has a book which he doesn’t like the most. The book contains lots of theory and he needs to teach this theory to his friend Shreyansh. So for a particular theory, the time at which Darshil was proposed to teach is T1 and the time at which theory gets completed is T2. so Darshil defines the theory period for the particular theory as [T1, t2).
Darshil has a lot of theories and all theory have their own time period. Now it is possible that more than one theory Darshil is teaching to his friend. Now you need to tell Shreyansh that how many maximum theories Darshil is teaching to him at a particular time T.
Input :
The first line of the input contains the integer t, the number of test cases.
For each test case, the first line contains a positive integer n, that is, the number of theories.
Then, n lines follow one for each theory(1 to n ). Each line contains, 2 integers T1[i] and T2[i].
T1[i] is the lower bound of the theory period for the theory i. (1 <= i <= n )
T2[i] is the upper bound of the theory period for the theory i. (1 <= i <= n )
Output:
The output contains t lines, one for each test case. Each line contains a positive integer, the required answer for that test case.
Constraints :
In the sample input, the number of test cases is 1.
For test case 1, the value of n = 5, that is, the number of theories.
The start time and the end time for each theory are measured from the same reference point.
1. The first theory is valid from 1s to 9s (Both Included)
2. Theory 2: It is valid from 2s to 3s (Both Included)
3. Theory 3: It is valid from 3s to 4s (Both Included)
4. Theory 4: It is valid from 11s to 11s (Both Included)
5. Theory 5: It is valid from 12s to 12s (Both Included)
It can be clearly seen at the time T = 3, a total of 3 theories are valid simultaneously. From time T = 1 to T = 12, the maximum number of simultaneously valid theories is 3 i.e. Darshil is teaching maximum three theories simultaneously. And this event occurs at T = 3 from the common reference.