Under construction

Still being built. Things may change

Communication Setup

Time limit2sMemory limit1024 MB

Summary
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 aa, bb, and cc. They were reset to factory values x=g(a,b)x = g(a, b), y=g(a,c)y = g(a, c), and z=g(b,c)z = g(b, c), where gg is the floor of the geometric mean: g(p,q)=⌊pq⌋g(p, q) = \left\lfloor \sqrt{pq} \right\rfloor Given the current values xx, yy, and zz, find any suitable aa, bb, and cc (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 nn, the number of crew members who need help (1≤n≤100 0001 \le n \le 100\,000). Each of the next nn lines contains three integers xx, yy, and zz (1≤x,y,z≤1091 \le x, y, z \le 10^9).

Output

For each triple xx, yy, zz, print suitable numbers aa, bb, and cc. If several answers exist, print any of them. If no answer exists, print three zeros.

Examples2

  1. Example 1

    Input
    1
    7 9 6
    
    Expected output
    11 5 8
    
  2. Example 2

    Input
    1
    10 11 12
    
    Expected output
    9 12 14