SOLVE
LATER
In a company, there are \(N\) employees. Their productivities are numbered from \(1\) to \(N\), each employee is assigned with an unique number. At the end of year, their boss decided to reward \(M\) bonus money for them. The rule is that if A's productivity is greater than B's one then A's money must not less than B's money. Your task is to find the number of ways to divide \(M\) bonus money among \(N\) employees acoording to above rule. As the answer can be very large, you only need to find it modulo \(P\).
Input Format
The first line contains two space-separated integers \(T, P\) denoting the number of test cases and the modulo.
Each test case is described in a single line containing two space-separated integers \(N, M\).
Output Format
For each test case, output a single line containing the answer.
Constraints
Query 1: there are three ways, that are: \((0, 5), (1, 4), (2, 3)\).
Query 2: there are three ways, that are: \((0, 0, 3), (0, 1, 2), (1, 1, 1)\).