Sum of Fractions
Very hard
Execution time limit is 2 seconds
Runtime memory usage limit is 256 megabytes
You are given a fraction 4/n.
Your task is to represent it as a sum 1/a + 1/b + 1/c where a > b > c are positive integers.
Input
The input file consists of multiple test cases. The first line of the input le contains one integer number T ≤ 1.5·10^4 the number of test cases. The following T lines contain one integer number 4 ≤ n ≤ 15000 each.
Output
For each test case, write to the output file a separate line with three integer numbers 2^63 > a > b > c > 0 separated by spaces such that 4/n = 1/a + 1/b + 1/c or three zeros, if such representation is impossible.
Examples
Input #1
Answer #1
Submissions 48
Acceptance rate 10%