STOP USING MONEY

Sort N games by satisfaction-to-price ratio, then by lower price, then by game number, and print the first K game numbers.

Medium4SortingMathImplementationArrayInterviewNo attempts yetTime limit1sMemory limit512 MB

Problem

Junseo likes games. He found an online store called Smog that sells games and lets a buyer re-download any purchased game at any time. Junseo thinks of himself as someone who knows how to enjoy things, so he would rather play many games a little than one game for a long time. Buying every game costs more money than he has. For each game he read the reviews and the details, then wrote down how much satisfaction he expects to get from it. Junseo now wants to pick the KK games with the best value for money, where value for money is satisfaction per unit of price, that is, satisfaction divided by price. He did not want to do the arithmetic by hand or write the program himself, so he asked you to write it. Given the list of games, print the numbers of the games Junseo buys, in the order defined below.

Input

Read the input from standard input. The first line has the number of games NN on Smog and the number of games KK that Junseo buys, separated by a space. (1N10001 \le N \le 1000, 1KN1 \le K \le N)

Each of the next NN lines has one game record ii, cc, hh separated by spaces, where ii is the game number, cc is the price and hh is the satisfaction. (1iN1 \le i \le N, 1c,h1081 \le c, h \le 10^8) Every number from 11 to NN appears exactly once, and the records are not necessarily given in number order.

Output

Write the output to standard output. Print KK game numbers, one per line, starting with the best value for money. Games with equal value for money are ordered by ascending price, and games with equal value for money and equal price are ordered by ascending number.

That order also decides which KK games are bought. Sort all NN games by it and the first KK of them are the answer.