You are given a positive integer N, find the expected length of the minimum cycle in permutation of integers from 1 to N. All permutations are equiprobable.
Consider the answer is an irreducible fraction BA. Output A⋅B−1modP, where P is a given prime number. It is guaranteed that gcd(B,P)=1.
The only line of input contains two integers N and P (1≤N≤104, 104<P≤109+33). It's guaranteed that P is a prime number.
Output the answer to the problem in a single line.