Doctor Nefario is leaving on a trip after a long stretch of work in his lab. On the way he has to cross a river. The river holds N rocks laid out on a straight line to the far bank, and he can use them as stepping stones. The width of the river, meaning the whole distance he has to cover, is L.
The doctor's scooter hovers but cannot jump far, so a longer jump needs a rocket booster. A booster costs more when it is stronger. A booster that jumps up to distance R costs R2. The booster works any number of times, but every jump costs another C. For example, a booster of range 10 used for five jumps costs 102+5×C=100+5C in total.
He starts on the near bank at distance 0 and finishes on the far bank at distance L. One jump moves him forward by at most R, and he must land on a rock or on the far bank.
Given the width L, the cost C of one jump, and the positions of the N rocks, find the minimum cost M of crossing the river, the number of jumps J it takes, and the booster range R.

In the figure the doctor crosses a river of width 6. The rocks sit at distances 1, 2, 3, and 5. A booster of range 3 carries him across in two jumps.
The limits are 1≤L≤109, 0≤C≤106, and 0≤N<1000. A rock position is an integer greater than 0 and less than L. The range R is chosen as a positive integer. The values grow large enough to need 64-bit integers, and scanning every possible range does not fit in the time limit.
The input holds several test cases. The first line of each test case has the integers L, C, and N: the width of the river, the cost of one jump, and the number of rocks. Each of the next N lines holds the position of one rock. The rocks are not always listed in order of position. The last line holds a single 0, and the input ends on that line.
For each test case print the minimum cost of crossing the river on one line, in this format.
Minimum cost M achieved with J jumps of range R
M is the minimum cost, R is the range that reaches it, and J is the smallest number of jumps needed to cross with range R. When several ranges reach the minimum cost, print the smallest of them as R.