Thief of clay
Mrs. Terry - art teacher at the kindergarten - like when her children sculpt something out of clay. One of her jobs is to give a piece of clay the shape of a rectangular bar and measure its sides. However, in each group is always a kid who tries to take away some clay from a friend. Since Mrs. Terry always gives all children equal pieces of clay, you can write a program that will help find the kidnapper of Mrs. Terry Clay and his sacrifice on the results of measurements of modeled children bars.
Input
Given one or more groups of children, which ends with the transfer line containing -1. Each group begins with a line containing n - number of children in the group. Then there are n lines of information about pupils. Each row contains three positive numbers representing the size of the resulting bar, and the child's name. In any group of at least 2 and no more than 9 students. Child's name up to 8 letters. Mrs. Terry gives at most by 250 cubic units of clay to each student.
The group is exactly one thief and a victim.
Output
Type one row for each group containing the names of the kidnapper and his victim, as shown in the example.