Long Jump Home
time limit per test
2 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output

Few people know, but in fact, rabbits do not jump high right after birth! Everything comes at a cost — therefore, rabbits buy their jumping abilities at the rabbit store. So, the rabbit Xeni came to this store, which is located at point $$$0$$$ on the number line.

In the store, there are $$$n$$$ abilities, the $$$i$$$-th of which costs $$$c_i$$$ carrots and teaches the rabbit to jump a distance of $$$x_i$$$ along the number line. That is, after purchasing the $$$i$$$-th ability, Xeni will be able to jump a distance of $$$x_i$$$ in either direction at any moment in time.

Immediately after her purchases at the store, Xeni wants to jump to point $$$L$$$ ($$$L \neq 0$$$), where her home is located. Help her figure out the minimum number of carrots she will need to spend to have the ability to reach point $$$L$$$ with the jumps she has acquired, or tell her that it is impossible.

Input

Each test consists of several sets of input data. The first line contains a single integer $$$t$$$ — the number of sets of input data ($$$1 \leq t \leq 1\,000$$$). The description of the sets of input data follows.

The first line of each set of input data contains two integers $$$n$$$ and $$$L$$$ — the number of abilities in the store and the coordinates of Xeni's home ($$$1 \leq n \leq 3\,000$$$; $$$|L| \leq 3\,000$$$; $$$L \neq 0$$$).

The second line of each set of input data contains $$$n$$$ numbers $$$x_i$$$ — the lengths of the jumps that can be acquired ($$$1 \leq x_i \leq 3\,000$$$).

The third line of each set of input data contains $$$n$$$ numbers $$$c_i$$$ — the costs of the abilities ($$$1 \leq c_i \leq 10^9$$$).

It is guaranteed that the sum of $$$n$$$ across all sets of input data does not exceed $$$3\,000$$$.

Output

For each test, output in a single line the minimum number of carrots Xeni will need to spend to jump home, or $$$-1$$$ if it is impossible.

Example

Input
5
3 5
2 4 6
3 1 2
2 555
5 9
7 9
3 12
6 8 14
100 3 5
4 13
6 10 15 13
4 3 2 100
4 -21
7 7 9 4
5 1 10 10
Output
-1
7
8
9
1