G. Krosh and permutation and expected number
time limit per test
3 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given number $$$n$$$. Consider permutation $$$p$$$ of integers from $$$1$$$ to $$$n$$$. Define $$$f(l, r) = (((p(l)$$$ $$$mod$$$ $$$p(l + 1))$$$ $$$mod$$$ $$$p(l + 2))$$$ $$$mod$$$ ... $$$mod$$$ $$$p(r)$$$. Let's beauty of permutation $$$B(p)$$$be the sum $$$f(l, r)$$$ over all the subsegments of permutation $$$B(p) = \sum_{l = 1}^n \sum_{r = l}^n f(l, r)$$$. Find expectation of the beauty of randomly chosen permutation of $$$n$$$ integers over given prime modulo $$$m$$$. It can be shown that answer can be represented as fraction $$$\frac{P}{Q}$$$, where $$$P$$$, $$$Q$$$ are integers and $$$Q \neq 0$$$ $$$(mod$$$ $$$m)$$$.

Input

You are given numbers $$$1 \le n \le 300$$$ and $$$10^8 \le m \le 10^9$$$ where m is prime.

Output

Output answer.

Examples
Input
2 998244353
Output
499122180
Input
1 998244353
Output
1
Input
3 700000001
Output
8