Communication Setup
Time limit2sMemory limit1024 MB
Given x, y, z as floors of the geometric means of pairs from unknown positive a, b, c, the task is to find any valid a, b, c or report zeros.
- Level
Medium5 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Statement
This problem is based on the geometric mean problem from a previous internet olympiad. Every crew member must complete many tasks to beat the impostors, but some tasks are too hard, and crew members are too tired after finishing the short and medium tasks, so they ask you for help. The current task is as follows. A device has three positive integer parameters , , and . They were reset to factory values , , and , where is the floor of the geometric mean: Given the current values , , and , find any suitable , , and (if they exist) so that the crew member can set up the device correctly. There are many crew members, and each one sets up their own device, so you must solve this problem several times in a row.
Input
The first line contains one integer , the number of crew members who need help (). Each of the next lines contains three integers , , and ().
Output
For each triple , , , print suitable numbers , , and . If several answers exist, print any of them. If no answer exists, print three zeros.