Rated Contest 2 P1 - An Odd Ski Trip

View as PDF

Points: 5 (partial)
Time limit: 2.0s
Memory limit: 256M

Author:
Problem type

Daniel is planning a ski trip with his friends for New Year's! But first, he must decide which ski resort to stay at... with a twist. Daniel loves odd numbers, so he will only go on ski hills with an odd number height. In addition, Daniel's favorite number is the number , so he wants the total height of all ski hills to be divisible by .

Can you help Daniel design a ski resort with hills, each with a different odd-value height? Each height must be in the range —we don't want Daniel and his friends to die if the hill is too tall!

is odd.

Input Specifications

The first and only line of input contains the integers and .

Output Specification

Output integers on a single line, the heights of the hills. Output -1 if there exists no such solution.

Sample Input

8 5

Sample Output

One possible solution is the following:

5 33 1 9 7 17 19 29

Sample Explanation

Each hill height is a unique odd integer between , and the sum of all hill heights is , which is divisible by .