ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

1541. Chase

Time limit: 1.0 second
Memory limit: 64 MB
Aragorn, Legolas, and Gimli chase a squadron of Uruks sent by Saruman. The friends have already went K leagues (K < 20). On the ith segment of length 1 league of their path (1 ≤ i ≤ K), their average velocity was Vi leagues per hour; Vi < Vj for i > j. Gimli notes that M/N hours have passed since the start of the chase, and it's time to overtake the Uruks at last. Find K if it is known that all Vi  are integers.

Input

The first line contains coprime integers M and N, 1 ≤ MN ≤ 50; M/N ≤ 3.

Output

In the first line output the number K and in the second line output the numbers Vi (1 ≤ i ≤ K) separated with a space. Note that nobody in Middle-earth can move faster than 100000 leagues per hour. If there are many solutions, then output any of them. If there is no solution, then output −1.

Sample

inputoutput
2 3
2
6 2
Problem Author: Alexander Ipatov
Problem Source: VIII USU Open Personal Contest (March 3, 2007)