Arrange
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
There are students in a classroom, out of which of them are girls. The teacher, Mr X wants to arrange all the students in a line. X thinks that his class girls are very talkative. So he doesn't want any two girls to be together. Mr X wants to know the number of ways he can arrange these students. Help him out.
Input
The first line contains a single integer , denoting the number of testcases. Each of the next lines contain two integers and .
Output
For each test case print the answer modulo in a single line.
Examples
Input #1
Answer #1
Submissions 307
Acceptance rate 36%