The Firm Knapsack Problem

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

The Knapsack problem is a classic problem in Computer Science.

It is stated the following way. There are nn items, for each item you know its weight w_iw\_i and cost cost_icost\_i. Also you know the capacity of the knapsack WW --- the upper limit for the total weight of taken items. The task is to select several items with total weight at most WW so that their total cost is as large as possible.

In this problem you don't have to solve the classic Knapsack problem. The jury has already solved it and found the exact answer: xx is the maximal possible total cost of items that fit into a knapsack of capacity WW. The jury doesn't tell you this value.

Your task is to solve The Firm Knapsack Problem. Now the knapsack of claimed capacity WW can hold the weight of items up to 32W\frac{3}{2}W. You need to solve the problem with this weakened constraint not worse than the jury have solved the problem with the original constraint WW.

In other words, you need to find a set of items with total cost at least xx and total weight at most 32W\frac{3}{2}W.

입력

The input data contains one or several test cases.

The first line contains the number of test cases. Then follow the tests in the following format.

The first line of the test case contains two integers nn and WW (1n1051 \le n \le 10^5; 1W10121 \le W \le 10^{12}) --- the number of items and the claimed capacity of the knapsack.

The next nn lines describe items. Each line contains two integers w_iw\_i and cost_icost\_i (1w_i,cost_i1061 \le w\_i, cost\_i \le 10^6) --- the weight and the cost of an item.

The sum of nn over all test cases is at most 10510^5.

출력

For each test case, output the selected set of items for weight constraint 32W\frac{3}{2}W in the following format.

The first line should contain the number of taken items.

The second line should contain the indices of taken items i_1 i_2  i_ki\_1\ i\_2\ \dots \ i\_k (1i_jn1 \le i\_j \le n). All indices i_ji\_j should be distinct. Items are numbered from 11 to nn in the same order as they are given in the input.

If there are several solutions, output any one of them.