#arc102c. [arc102_c]Stop. Otherwise...
[arc102_c]Stop. Otherwise...
Problem Statement
Takahashi throws dice, each having sides with all integers from to . The dice are NOT pairwise distinguishable. For each , find the following value modulo :
- The number of combinations of sides shown by the dice such that the sum of no two different sides is .
Note that the dice are NOT distinguishable, that is, two combinations are considered different when there exists an integer such that the number of dice showing is different in those two.
Constraints
- and are integers.
Input
Input is given from Standard Input in the following format:
Output
Print integers. The -th of them should be the answer for .
Sample Input 1
3 3
Sample Output 1
7
7
4
7
7
- For , the combinations $(1,2,2),(1,2,3),(1,3,3),(2,2,2),(2,2,3),(2,3,3),(3,3,3)$ satisfy the condition, so the answer is .
- For , the combinations $(1,1,1),(1,1,3),(1,3,3),(2,2,2),(2,2,3),(2,3,3),(3,3,3)$ satisfy the condition, so the answer is .
- For , the combinations satisfy the condition, so the answer is .
Sample Input 2
4 5
Sample Output 2
36
36
20
20
20
36
36
Sample Input 3
6 1000
Sample Output 3
149393349
149393349
668669001
668669001
4000002
4000002
4000002
668669001
668669001
149393349
149393349