Thief of clay#2335

Thief of clay

1 second
64 megabytes
Easy

Mrs. Terry, an art teacher at a kindergarten, likes it when her students sculpt objects out of clay. One of her assignments is for each child to form a piece of clay into a rectangular block and measure its dimensions. However, in each group, there is always one child who tries to take some clay from another. Since Mrs. Terry always gives all children equal pieces of clay, you are to write a program that, based on the measured block sizes, helps her find the clay thief and the victim.

Input

There are one or more groups of children, listed one after another, ending with a line containing -1. Each group starts with a line containing , the number of children in the group. Then, lines follow, each with three positive numbers (the dimensions of the block) and the child's name. Each group contains at least and at most students. A child's name is at most letters. Mrs. Terry gives each student at most cubic units of clay.

There is exactly one thief and one victim in each group.

Output

For each group, print a line containing the names of the thief and the victim, as shown in the example.

Examples

Example 1

Loading
Loading