Communism

Supreme_Leader wants to establish communism. He decides to calculate how many each person will earn based on the income of each member of the Motherland. He also wants to find out the list of the names of the people with the lowest income to kick from the country, based on how much they contributed.


Input Specification


The first line will contain two integers \(N (2 \le N \le 1000)\) and \(K (1 \le K < N)\) .

The \(K\) represents the number of people Supreme_Leader decides to kick.

The next \(N\) line will contain a string and a float \(M_i (10 \le M_i \le 1000000000000)\) separated by a space.

The string represents a person's name, and \(M_i\) represents their income.


Output Specification


The first line of output will contain an integer, representing the amount of income each member of the Motherland will receive rounded to the nearest integer.

The next \(K\) lines of output will contain the names of people that has to be kicked, ordered by the income of the people from the lowest to the highest.


Sample Input


4 2
Kelly 1000
Rose 1000000
Zuck 10
Telly 69420


Sample Output


535215
Zuck
Kelly


Sample Explanation


Since Supreme_Leader decides to kick 2 people, he has to kick Zuck and Kelly because they contributed the least amount of income. Since the Motherland has collected \(\$1000+1000000+10+69420\) from 4 people, but kicked 2 people, there are 2 remaining members of society to receive the reward for their work.

Therefore each member receives \(\$\frac{1000+1000000+10+69420}{2}\).

Comments
  • There are no comments.