eolymp
bolt
Try our new interface for solving problems
Problems

Passing grade

Passing grade

A list of students is given with annual grades in all subjects. For admission to the School for Gifted Children, it is necessary that the average score in all subjects is not lower than k. Determine which of the listed children can be enrolled in this school.

Input

The first line contains the number of students n (1n104) in the list. Each of the following n lines has the form: last name and first name, number of subjects mi (1mi50) that the student studied, and then the annual grades for each of these subjects.

The last line contains a single number k - the passing grade. Surname and first name are strings consisting of no more than 20 Latin letters. All input numbers are positive integers and do not exceed 109.

Output

Print the list of children who can be enrolled in the school. Print the children in the same order like they are given in the input.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3
Ivanov Ivan 2 7 9
Petrov Petr 1 7
Sidorov Sidor 2 10 8
8
Output example #1
Ivanov Ivan
Sidorov Sidor