404640: GYM101597 C Candy division

Memory Limit:64 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

C. Candy divisiontime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output

Your older sister has three kids. Whenever you go to visit her, you bring along a bag of candies for the kids. There are n candies in the bag. You want to give all the candies to the kids, but you also want to teach them a little math along the way. Therefore, you gave them not just the bag of candies but also one simple rule: each of the kids must take an integer fraction of candies in the bag. In other words, the amount of candies each kid takes must be a divisor of n.

Formally, in order to divide all the candies the kids have to find three positive integers a1, a2, a3 such that n = a1 + a2 + a3 and each ai divides n.

Input

The first line of the input contains a single integer t – the number of test cases to follow. Each of the following t lines of the input contains the integer n. You may assume that 1 ≤ t ≤ 100 and 1 ≤ n ≤ 1018.

Output

Output t lines. The k-th line will solve the k-th test case and will contain three integers ai as specified above. If there are multiple solutions you may select an arbitrary one. If there are no solutions, output the word 'IMPOSSIBLE' instead (quotes only for clarity).

ExampleInput
3
1
3
12
Output
IMPOSSIBLE
1 1 1
4 6 2

加入题单

上一题 下一题 算法标签: