Modular C(n,r)
medium
You have T test cases and for each test case you have been given n and r values and you need to find nCr mod 10^9+7.
Constraints
1 <= T <= 10^6 1 <= n <= 3000 1 <= r <= n
Format
Input
The first line contains an integer T. Next T lines contain integers n and r.
Output
for each query print nCr mod 10^9+7 in a line.
Example
Sample Input
3
4 3
5 2
10 8
Sample Output
4
10
45