eolymp
bolt
Try our new interface for solving problems
Problems

Sum of Fractions

Sum of Fractions

You are given a fraction \textbf{4/n}. Your task is to represent it as a sum \textbf{1/a + 1/b + 1/c} where \textbf{a} > \textbf{b} > \textbf{c} are positive integers. \InputFile The input file consists of multiple test cases. The first line of the input le contains one integer number \textbf{T} ≤ \textbf{1.5·10^4}  the number of test cases. The following \textbf{T} lines contain one integer number \textbf{4} ≤ \textbf{n} ≤ \textbf{15000} each. \OutputFile For each test case, write to the output file a separate line with three integer numbers \textbf{2^63} > \textbf{a} > \textbf{b} > \textbf{c} > \textbf{0} separated by spaces such that \textbf{4/n = 1/a + 1/b + 1/c} or three zeros, if such representation is impossible.
Time limit 2 seconds
Memory limit 256 MiB
Input example #1
1
4
Output example #1
6 3 2
Source Yandex.Algorithm, Test Round, 27/06/2013