#arc140f. [arc140_f]ABS Permutation (Count ver.)
[arc140_f]ABS Permutation (Count ver.)
Problem Statement
Find the number of permutations of that satisfy the following, modulo , for each .
- There are exactly integers such that and .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of permutations that satisfy the condition, modulo , for each .
Sample Input 1
3 1
Sample Output 1
0 4 2
- For , the condition is satisfied by no permutations .
- For , the condition is satisfied by four permutations : .
- For , the condition is satisfied by two permutations : .
Sample Input 2
4 3
Sample Output 2
12 12 0 0
Sample Input 3
10 5
Sample Output 3
1263360 1401600 710400 211200 38400 3840 0 0 0 0