You are given two arrays. For a pair of numbers, one from each array with sum atleast x, find the worst possible rank of the pair.
Rank of the pairs is decided after taking the sum of each pair and sorting the sums in non-increasing order.
Input:
The first line contains t, the number of test cases. Each test case goes as follows -
The first line contains 2 space-separated integers - n and x.
The second line contains the first array - n space-separated integers.
The third line contains the second array - n space-separated integers.
Output:
Print the answer to the above problem in a new line or "-1" if the above condition does not holds true.
Constraints:
1 <= t <= 50
1 <= n <= 10^5
1 <= x <= 2*10^5
1 <= array elements <= 10^5
Problem Setter:
Devesh Jagwani