Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EISCH4 - SCHOLARSHIPS

This quarter, a university will give at most m special scholarships to the best students who meet criteria: earn at least k credits (each passed courses is 4 credits), and GPA equals or greater p. Output the list of students gets the scholarship.

Input

The first line contains 4 integer n, m, k, p (n ≤ 105) which are the number of students, the number of scholarships, the minimum number of credits and the required GPA.

In the next n lines, each represents a student:

  • Student's name (including lower case letters and not exceeding 20 characters).
  • c, the number of courses that the student took (1 ≤ c ≤ 30)
  • c integers which are scores of c courses (ci ≤ 100)

Output

The list of students sorted in the decreasing order of average score and increasing name. If two students have the same average scores should both receive scholarships, or none of them receive scholarship.

Example

Input:
6 3 8 75 
nam 2 80 90
an 2 90 90
ngoc 2 100 40
duc 1 100
khanh 2 100 90
phi 2 90 80


Output:
khanh 95
an 90


Added by:Ha Minh Ngoc
Date:2021-04-04
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.