#t549. 谁考了第k名

谁考了第k名

Who Ranked k-th

Problem Description

In an exam, all students have different scores. Given each student's ID and score, find the ID and score of the student ranked kk-th.

Input Format

The first line contains two integers: the number of students nn (1≤n≤1001 \le n \le 100) and the rank kk to query (1≤k≤n1 \le k \le n).

The following nn lines each contain one student's ID (an integer) and score (a floating-point number), separated by a space.

Output Format

Output the kk-th student's ID and score, separated by a space. (Note: output the score using %g.)

Sample Input

5 3
90788001 67.8
90788002 90.3
90788003 61
90788004 68.4
90788005 73.9

Sample Output

90788004 68.4

Sample Explanation

In the input n=5n = 5 and k=3k = 3. The five students' scores sorted from high to low are:

  • 1st: ID 9078800290788002, score 90.390.3;
  • 2nd: ID 9078800590788005, score 73.973.9;
  • 3rd: ID 9078800490788004, score 68.468.4;
  • 4th: ID 9078800190788001, score 67.867.8;
  • 5th: ID 9078800390788003, score 6161.

So the 3rd student is the one with ID 9078800490788004 and score 68.468.4. Output the ID and score separated by a space, as shown in the sample output.

Constraints

1≤n≤1001 \le n \le 100, 1≤k≤n1 \le k \le n. The ID is an integer and the score is a floating-point number. All students' scores are different.