- Time limit: 1.00 s
- Memory limit: 512 MB
Your task is to count the number of sequences of length where each element is an integer between and each integer between appears at least once in the sequence.
For example, when and , some valid sequences are and .
Input
The only input line has two integers and .
Output
Print one integer: the number of sequences modulo .
Constraints
Example
Input:
6 4
Output:
1560