PROGRAMMING:plant apples
Recently, the popular game of growing apples is that players plant an apple tree with an initial growth value of 0. Every time they water it, the growth value will increase. When the growth value is greater than or equal to V, they can harvest mature apples. Players have five colors (red, yellow, blue, green, purple) of the kettle, each time you water a kettle, different colors of the kettle water is not necessarily the same, so with different colors of the kettle watering apple tree growth value may also be different. After the apple matures, the remaining water in the kettle can still be used in the next game. Therefore, players want to use the least amount of water to make the apple mature and save water to the greatest extent. Please help him calculate the minimum amount of water for Apple ripening.
###Input format:
Enter an integer t (1 < = T < = 100) in the first line to represent the number of groups of test data, and an integer V (0 < = V < = 10 ^ 12) in the first line of each group to represent the growth value of Apple ripening. The next five lines include three integers n, G, w (0 < = n < = 1000, 0 < = w, G < = 10 ^ 9), representing the number of water bottles of one color, the corresponding growth value after watering, and the amount of water, The middle is divided by spaces, and the total number of all color bottles is not more than 1000.
###Output format:
Each group of data corresponds to a row of output. If the apple can ripen, this line outputs two integers, which represent the minimum watering amount and the growth value respectively. If all the water in the kettle is poured and the apple is not ripe, the output is "impossible!".
###Input example:
```in
three
one hundred
20 5 5
16 10 4
3 20 10
15 2 2
5 8 6
sixty
2 3 2
3 5 6
1 3 5
2 6 1
3 4 2
fifty
2 20 10
3 10 20
2 5 6
20 4 10
12 6 5
```
###Output example:
```out
40 100
Impossible!
30 52
```
answer:If there is no answer, please comment
###Input format:
Enter an integer t (1 < = T < = 100) in the first line to represent the number of groups of test data, and an integer V (0 < = V < = 10 ^ 12) in the first line of each group to represent the growth value of Apple ripening. The next five lines include three integers n, G, w (0 < = n < = 1000, 0 < = w, G < = 10 ^ 9), representing the number of water bottles of one color, the corresponding growth value after watering, and the amount of water, The middle is divided by spaces, and the total number of all color bottles is not more than 1000.
###Output format:
Each group of data corresponds to a row of output. If the apple can ripen, this line outputs two integers, which represent the minimum watering amount and the growth value respectively. If all the water in the kettle is poured and the apple is not ripe, the output is "impossible!".
###Input example:
```in
three
one hundred
20 5 5
16 10 4
3 20 10
15 2 2
5 8 6
sixty
2 3 2
3 5 6
1 3 5
2 6 1
3 4 2
fifty
2 20 10
3 10 20
2 5 6
20 4 10
12 6 5
```
###Output example:
```out
40 100
Impossible!
30 52
```
answer:If there is no answer, please comment