#K88927. Most Challenging Puzzle

    ID: 37417 Type: Default 1000ms 256MiB

Most Challenging Puzzle

Most Challenging Puzzle

You are given a set of puzzles. Each puzzle is represented by three integers: height, width, and the number of pieces. The challenge is to determine the most challenging puzzle, where the difficulty is determined primarily by the area, and if two puzzles share the same area, the one with more pieces is considered more challenging.

Formally, for a puzzle with height \(h\), width \(w\), and pieces \(p\), the area is given by \(A = h \times w\). Given \(t\) puzzles, your task is to find the puzzle with the maximum area. In the event of a tie (i.e. when two puzzles have the same area), choose the puzzle with the higher number of pieces.

inputFormat

The first line contains an integer \(t\), representing the number of puzzles. Each of the next \(t\) lines contains three space-separated integers: \(h\) (height), \(w\) (width), and \(p\) (pieces) of the puzzle.

outputFormat

Output a single line with three space-separated integers corresponding to the height, width, and pieces of the most challenging puzzle.

## sample
1
10 15 200
10 15 200

</p>