leading-1
Source: hackerearth
Difficulty: UNKNOWN_DIFFICULTY

Watson asks Sherlock: 
Given a string S of N 0's and M 1's, how many unique permutations of this string start with 1? 

Help Sherlock by printing the answer modulo (109+7). 

Input Format:

First line contains T, the number of test cases.
Each test case consists of N and M separated by a space.

Output Format:

For each test case, print the answer modulo (109+7).

Constraints: 

1 ≤ T ≤ 200 
1 ≤ N,M ≤ 1000 

SAMPLE INPUT
2
1 1
2 3

SAMPLE OUTPUT
1
6