relief-operation
Source: hackerearth
Difficulty: UNKNOWN_DIFFICULTY

As the battle between the forces intensified, casualties were soaring. The medical team comprising of medical members lead by Hagrid were crossing across the battlefield. Suddenly a stray “Petrificus Totalis” curse flew straight at him. Hagrid, succumbed by the curse, could no longer move. The huge chest carried by him was now of the responsibility of the rest of the crew. The crew members now had to carry the entire contents of the chest comprising a number of potions and supplies. Each crew member can carry only a certain maximum load, they now have to salvage the relief operation by smartly carrying dearer potions and supplies.

INPUT: 
The first line contain number of test cases "T"."T" test cases follows then. For each test case, the first line contains the number of relief items "M". The second line contains the maximum load "L"(sum of individual load bearing abilities) those team members can afford to carry. The third line contains the individual weight of each item. Then the next line contains the worth "W" of those "M" relief items.

OUTPUT:
For each test case output the maximum value of the relief items that can be saved.

CONSTRAINT:
1 ≤ T ≤ 200
0 ≤ M ≤ 2000
1 ≤ maximum load ≤ 2000
1 ≤ load of an item ≤ 2000
1 ≤ worth of an item ≤ 2000

SAMPLE INPUT
2
3 
3
1 2 3     
2 4 8
4 
8
2 4 5 7
4 9 7 5

SAMPLE OUTPUT
8
13