Labeled Connected Graphs

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

You are given an integer nn and a prime modulo mm.

Calculate the sum of distances between the first and the second vertices over all distinct labeled connected graphs with nn vertices.

Output any integer congruent to the actual sum modulo mm. Formally, if the actual sum is SS output any integer xx such that 263x<263-2^{63} \leq x < 2^{63} and xSx - S is divisible by mm.

입력

The only line contains two integers nn and mm (2n400,106+3m109+92 \leq n \leq 400, 10^6 + 3 \leq m \leq 10^9+9, mm is prime), the number of vertices in the graphs and the modulo.

출력

Print a single integer --- the answer to the problem.

힌트

If you manage to get WA in this problem and we reasonably believe that you did not intentionally try to do so, we might give you a cookie somehow.