while 1:
try:
m,n = map(int,input().split(' '))
dic = {}
p = round(n*1.5//1) #进入面试的人数 = 计划录取人数n的150%再取整,这个要注意!
for i in range(m):
k,v = map(int,input().split(' '))
dic[k] = v
newdic = sorted(dic.items(), key=lambda x:(-x[1],x[0]))
lst=list(newdic)
q = 0
for i in range(len(lst)):
if lst[i][1] >= lst[p-1][1]:
q+=1
print(lst[p-1][1],q)
for i in range(q):
print(lst[i][0],lst[i][1])
except:
break

京公网安备 11010502036488号