SP4186 HS08CODE - Break a New RSA system
Description
Today, Gerrob's RSA company has featured a New RSA cryptosystem: its public key is _n_, the secret keys are three distinct primes _p_, _q_ and _r_, where _n_=_p_\*_q_\*_r_. Note that the ordinary RSA uses only 2 primes! Unfortunately some hackers have stolen a DVD from the company. It does not store the secret keys, only some information about the system, namely, the values of:
φ (_n_) - Euler's totient function and
σ (_n_) - the sum of the divisors.
Obviously you know also _n_, because that's public.
Now, Gerrob's RSA employees are trying to determine if hackers will be able to break the system. Could you help them to answer this question?
Input Format
The first line contains a single integer _T_, the number of test cases, where _T_≤ 20000. The following _T_ lines each contains three numbers n, φ (_n_) and σ (_n_) in this order. There are 5 input sets.
Output Format
Output _T_ lines, the values of _p_, _q_ and _r_ in increasing order. It is guaranteed that _p_, _q_, _r_