- Time limit: 1.00 s
- Memory limit: 512 MB
Your task is to count the number of permutations of that have exactly inversions (i.e., pairs of elements in the wrong order).
For example, when and , there are such permutations:
Input
The only input line has two integers and .
Output
Print the answer modulo .
Constraints
Example
Input:
4 3
Output:
6