Олимпиадный тренинг

Задача 38718. Three best


Identify the three students with the best GPA in three subjects. Print the first and last names of these students. If at the same time, several students have the same average score as the average score of the student who "took 3rd place", then you need to print them all.

Input
First, the number of students n is given, then n lines, each of which contains the last name, first name and three numbers (grades in three subjects: mathematics, physics, computer science). The data in a line is separated by a single space. Ratings take a value from 1 to 5.

Imprint
It is necessary to output pairs of surname-first name, one per line, separating the surname and first name with one space. No ratings required. The output order must be the same as in the original data.
 
 
Examples
# Input Output
1 3
Yakovlev Ivan 5 5 5
Yapryntsev Aleksey 5 5 5
Kozlov Georgiy 5 5 5
Yakovlev Ivan
Yapryntsev Aleksey
Kozlov Georgiy