시간 제한
메모리 제한
시간 제한
2초
메모리 제한
64 MB
Demy has n jewels. Each of her jewels has some value v_i and weight w_i.
Since her husband John got broke after recent financial crises, Demy has decided to sell some jewels. She has decided that she would keep k best jewels for herself.
She decided to keep such jewels that their specific value is as large as possible. That is, denote the specific value of some set of jewels S=i_1,i_2,…,i_k as
s(S)=∑_j=1kw_i_j∑_j=1kv_i_j.
Demy would like to select such k jewels that their specific value is maximal possible. Help her to do so.
The first line of the input file contains n --- the number of jewels Demy got, and k --- the number of jewels she would like to keep (1≤k≤n≤100,000).
The following n lines contain two integer numbers each --- v_i and w_i (0≤v_i≤106, 1≤w_i≤106, both the sum of all v_i and the sum of all w_i do not exceed 107).
Output k numbers --- the numbers of jewels Demy must keep. If there are several solutions, output any one.