P13409 [CodeChef] cb01
NOI
题目描述

This is a very simple problem. Given the value of N and K, you need to tell us the value of the binomial coefficient C(N,K). You may rest assured that K ≤ N and the maximum value of N is 1,000,000,000,000,000. Since the value may be very large, you need to compute the result modulo 1009.

Input
The first line of the input contains the number of test cases T, at most 1000. Each of the next T lines consists of two space separated integers N and K, where 0 ≤ K ≤ N and 1 ≤ N ≤ 1,000,000,000,000,000.

Output
For each test case, print on a new line, the value of the binomial coefficient C(N,K) modulo 1009.

Example

Input:
3
3 1
5 2
10 3
Output:
3
10
120

输入格式

见题面

输出格式

见题面

样例输入
3 3 1 5 2 10 3
样例输出
3 10 120