Problem: Polycarp often uses his smartphone. He has already installed applications on it. Application with number takes up units of memory.
Polycarp wants to free at least units of memory (by removing some applications).
Of course, some applications are more important to Polycarp than others. He came up with the following scoring system — he assigned an integer to each application:
- — regular application;
- — important application.
According to this rating system, his phone has convenience points.
Polycarp believes that if he removes applications with numbers , then he will free units of memory and lose convenience points.
For example, if , , , , then Polycarp can uninstall the following application sets (not all options are listed below):
- applications with numbers and . In this case, it will free units of memory and lose convenience points;
- applications with numbers and . In this case, it will free units of memory and lose convenience points.
- applications with numbers and . In this case, it will free memory units and lose convenience points.
Help Polycarp, choose a set of applications, such that if removing them will free at least units of memory and lose the minimum number of convenience points, or indicate that such a set does not exist.
Input Format: The first line contains one integer () — the number of test cases. Then test cases follow.
The first line of each test case contains two integers and (, ) — the number of applications on Polycarp's phone and the number of memory units to be freed.
The second line of each test case contains integers () — the number of memory units used by applications.
The third line of each test case contains integers () — the convenience points of each application.
It is guaranteed that the sum of over all test cases does not exceed .
Output Format: For each test case, output on a separate line:
- -1, if there is no set of applications, removing which will free at least units of memory;
- the minimum number of convenience points that Polycarp will lose if such a set exists.
Note: In the first test case, it is optimal to remove applications with numbers and , freeing units of memory. .
In the second test case, by removing the only application, Polycarp will be able to clear only of memory units out of the needed.
In the third test case, it is optimal to remove applications with numbers , , and , freeing units of memory. .
In the fourth test case, it is optimal to remove applications with numbers , and , freeing units of memory. .
In the fifth test case, it is optimal to remove applications with numbers and , freeing units of memory. .