403127: GYM101020 K Clash Of Snakes
Description
Two lovely snakes Kiki and Susu like to play in a rectangular field divided into equal-sized squares. For us, it doesn't matter what the rules of the game play are, but we are interested in the rules of the starting. These rules are: 1- Each snake must lie in either a vertical or a horizontal line. 2- Both snakes must be inside the garden (their whole bodies are inside). 3- No snake can share a square in the field with the other snake. The following figure shows some valid and invalid cases of starting (in case of a field of size 5 × 5, Kiki's length is 3 and Susu's length is also 3):
Your program will be tested on one or more test cases. The first line of the input contains T (1 ≤ T ≤ 1000) the number of test cases following. Each test case consists of a single line containing 4 space separated integers n,m,k,s representing the length of the field, the width of the field, the length of Kiki and the length of Susu respectively. For each test case, these constraints hold: (2 ≤ n,m ≤ 100000) and (2 ≤ k,s ≤ min(n,m)).
OutputFor each test case print a single line containing "Case c: " without quotes where c is the number of the test case, and then the number of ways in which the two snakes can start their game modulo 1000000007.
ExamplesInput4Output
2 2 2 2
3 3 3 3
2 3 2 2
4 4 3 2
Case 1: 16
Case 2: 48
Case 3: 88
Case 4: 1056