#SDNU1311. Binomial Coeffcients

Binomial Coeffcients

Description

The binomial coefficient CnkC_n^{k} is the number of ways of picking kk unordered outcomes from nn possibilities, also known as a combination or combinatorial number.

Give nn and kk, you are required to calculate CnkC_n^{k} mod 10000003.

Format

Input

The input contains several test cases. The first line of the input contains one positive integer, cc, denoting the number of test cases.

Each of the following cc lines contains two integers, n(0n1000)n(0\le n\le 1000) and k(0kn)k (0\le k\le n), denoting that you are required to calculate CnkC_n^k mod 10000003.

Output

For each test case, output one line containing CnkC_n^k mod 10000003.

Samples

3
1 1
10 2
954 723
1
45
3557658