For an upcoming programming contest, Roy is forming some teams from the students of his university. A team can have any number of contestants.
Roy knows the skill level of each contestant. To make the teams work as a unit, he forms the teams based on some rules. Each of the team members must have a unique skill level for the team. If a member's skill level is where , there exists another team member whose skill level is . Note that a contestant can write buggy code and thus can have a negative skill level.
The more contestants on the team, the more problems they can attempt at a time so Roy wants to form teams such that the smallest team is as large as possible.
For example, there are contestants with skill levels . There are many ways teams could be formed, e.g. [-1], ,...,. At the other end of the spectrum, we could form and . We're looking for the largest smaller team size though. Two sets that meet the criteria are and . The largest smaller team size possible is .
Note: There is an edge case where contestants have registered. As no teams are to be created, the largest team created will have members.
The first line contains an integer , the number of test cases.
Each of the next lines contains a string of space-separated integers, followed by integers , a list of the contestants' skill levels.
For each test case, print the size of largest possible smallest team on a separate line.