P7427 [THUPC 2017] Play a Game

Description

ljcc and his junior schoolmate are playing a game. The game has a total of $n$ rounds. Winning in the $i$-th round gives $i$ points. There are no draws. Now you are given the scores of ljcc and the schoolmate. Determine whether there exists a valid plan that matches the current scores.

Input Format

Read from standard input. Input one line with two integers $a,b$, representing the scores of ljcc and the schoolmate.

Output Format

Write to standard output. If there is a solution, output one valid solution in one line. The first number represents that the game has played a total of $n$ rounds. Then output several numbers indicating in which rounds ljcc won. Separate every two numbers by a single space, and there must be no trailing spaces at the end of the line. If there is no valid solution, output `No`.

Explanation/Hint

**Due to SPJ issues, it is forbidden to output trailing spaces or extra newlines**. Constraints: $a,b\le 2^{31}-1$, $1\le n\le 10^5$. #### Copyright Information From THUPC (THU Programming Contest, Tsinghua University Programming Contest) 2017. Translated by ChatGPT 5