Given an envelope, at most stamps are allowed to be pasted. Calculate how to design the face value of stamps so for the maximum value where every postage between and can be obtained if given () types of stamps (assuming there are infinitely many stamps of each type).
For example, , , if the face values are cent and cents, then every postage between cents will be able to be obtained. Every postage between cents can be obtained if the face values are cent, and cents, respectively. It can be proven that when , , cents is the maximum continuous postage that can be obtained, so and the face values are cent and cents respectively.
Input Specification
The input contains two integers, and .
Output Specification
There should be two lines of output.
The first line of output should contain the face values chosen to maximize in increasing order.
Output MAX=S
on the second line, where represents the maximum postage that can be obtained.
Sample Input
3 2
Sample Output
1 3
MAX=7
Problem translated to English by .
Comments