## choice : hard

Time Limit: 1 sec
Memory Limit: 256 MB
Attempts: 0
Accuracy: 0.00%
Author: Akashdeep Goel

Its Penny birthday! And Leonard wants to impress her by giftng her choclates. He goes to the market and finds out that there are a total of n choclate brands avilable in the market. But Leonard is not sure about which of these Penny would like so he decides to buy any r choclates out of these n choclates. Just then Sheldon points out that, given the large number of combinations possible to choose r choclates out of n choclates, his chance of impressing Penny are very slim. As Leonard refuses to believe him, he asks you to write a program to calculate the number of ways of choosing r choclates out of n choclates. As this number can be very large, print the answe modulo 1000000007

Input :

First line contains T - the number of test cases. T lines follow. Each line contains a 2 space seperated integers -n and r.

Output :

Print the number of ways of choosing r choclates out of n choclates.

Constraint :

1 < T < 100000

1 < n ,r < 1000

Example :

Input:

2

3 2

4 4

Output:

3

1

ID

SUBMITTED AT

STATUS

LANGUAGE

TIME

MEMORY USED

USER

TIME

STATUS

LANGUAGE

TIME

MEMORY USED