After a programming contest, participants may vote for one staff member who deserves an honorarium. A participant may also choose not to vote.
Let X be the total number of contest participants. Any staff member whose vote count is less than 5% of X is removed from consideration. For each remaining staff member, create 14 scores by dividing their vote count by 1, 2, ..., 14.
Collect all scores from all remaining staff members, then choose the 14 largest scores in descending order. Whenever a score is chosen, the staff member who produced that score receives one chip. All values in the score set are guaranteed to be distinct.
Given each staff member's vote count, determine how many chips each remaining staff member receives.
The first line contains the number of participants X. (1 <= X <= 2,500,000)
The second line contains the number of staff members N. (0 <= N <= 10)
Each of the next N lines contains a staff member's name and vote count, separated by a space. Each staff name is one uppercase English letter.
For every staff member with at least 5% of the votes, print one line in lexicographic order of staff name. Each line must contain the staff name and the number of chips that staff member receives, separated by a space.
If no staff member satisfies the condition, print nothing.