Andrew is planning something and he needs your help. Andrew needs your help to determine how many permutations of the first positive integers are good.
A permutation is good if there exists an index such that .
Since the answer might be very large, output it modulo .
Constraints
Subtask 1 [10%]
Subtask 2 [30%]
Subtask 3 [60%]
No additional constraints.
Input Specification
The first and only line contains and .
Output Specification
Output the number of good permutations, modulo .
Sample Input 1
3 2
Sample Output 1
4
Explanation
The good permutations are , , , and .
Sample Input 2
838383 833883
Sample Output 2
711361423
Comments