Shekhu has balls. She wants to distribute them among one or more buckets in a way that satisfies all of these constraints:
The numbers of balls in the buckets must be in non-decreasing order when read from left to right.
The leftmost bucket must be non-empty and the number of balls in the leftmost bucket must be divisible by .
The difference (in number of balls) between any two buckets (not just any two adjacent buckets) must be less than or equal to .
How many different ways are there for Shekhu to do this? Two ways are considered different if the lists of numbers of balls in buckets, reading left to right, are different.
输入格式
The first line of the input gives the number of test cases, .
test cases follow. Each test case consists of one line with two integers and , as described above.
输出格式
For each test case, output one line containing Case #x: y, where is the test case number (starting from ) and is the answer, as described above.
样例
样例输入 1
3
7 1
7 2
2 4
样例输出 1
Case #1: 10
Case #2: 1
Case #3: 0
数据范围与提示
In sample case #1, the possible distributions are: