Cheat

Time Limit: 5000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 2659
64-bit integer IO format: %I64d      Java class name: Main

Description

In the summer of last year, Lemon, Yifenfei and CTW live in the same apartment. They usually played some game after they came back from lab. One day, Yifenfei came up with an idea about a new game. That game's rules are as follows:
Yifenfei provides a positive integer n, Lemon and CTW should give 3 positive integers x, y and z in a limited time. The winner is who make the |n - x * y * z| as small as possible. If the value of |n - x * y * z| is tied, the rusult is determined by smaller x, then smaller y, then smaller z, until the winner appear. To make this game more diffcult, Yifenfei will also give a list of positive integers, x, y and z cannot be included in this list.
Because Lemon is so smart, CTW never win even one game. Can you provides CTW a program to help him to get the optimum answer?

Input

Input includes several cases. The first line of a case contains two integers t, n. Then follows t positive integers in the seconde line.Input ends with a case t = 0 and n = 0. 0 <= t <= 50, 0 < n <= 1000.

Output

Every case print three positive integers x, y, z.

Sample Input

1 1
1
2 10
1 2
0 0

Sample Output

2 2 2
3 3 3

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .