401441: GYM100451 J Gennady and Problems

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

Description

J. Gennady and Problemstime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard output

It is well known that Gennady is a great master of solving programming tasks. The time that is takes Gennady to solve a problem does not depend on it's difficulty, but only on how tired Gennady is.

Today Gennady is going to solve n problems. He knows that he will solve the first problem in one minute, the second problem in two minutes, the third one in three minutes, and so on.

But sometimes Gennady can make pauses in solving problems and restore his power by eating a chocolate bar. To take a rest and eat a chocolate bar, Gennady spends exactly t minutes. He can eat a chocolate bar only in moments between solving problems. He should completely solve a problem to eat a chocolate bar. After Gennady eats a chocolate bar, he again solves next problem in one minute! But power of Gennady does not restore completely: the time of solving the following problems depends on the number of eaten chocolate bars. If he has eaten x chocolate bars, he spends (x + 1) minutes more on each succeeding problem (he spends (x + 2) minutes on the second problem, (2x + 3) minutes on the third, and so on).

For example, if after solving five problems Gennady eats the first chocolate bar, the 6-th, the 7-th and the 8-th problem will take him one, three and five minutes correspondingly. If he eats one more chocolate bar after that, he will solve the 9-th problem in one minute and the 10-th problem in four minutes. If it takes t = 4 to eat a chocolate bar, then to solve ten problems using this strategy he will spend 1 + 2 + 3 + 4 + 5 + 4 + 1 + 3 + 5 + 4 + 1 + 4 = 37 minutes.

For sure, Gennady wants to solve all n problems as soon as possible. Help him to arrange pauses in an optimal way. Assume that he has an unlimited number of chocolate bars.

Input

Input contains two integers n and t (1 ≤ n, t ≤ 106).

Output

In the first line print the minimum time that Gennady can solve all problems in. In the second line print k — the number of chocolate bars he should eat to do this. In the third line print the increasing sequence of k integers b1, b2, ..., bk, where bi denotes that Gennady should make the i-th pause after solving bi problems.

ExamplesInput
10 4
Output
37
2
5 8
Input
10 20
Output
55
0

加入题单

算法标签: