Master Zhu once came up with the following mathematical problem:
Given four integers, A, B, C, and D, how many different quadruples of integers (a,b,c,d) are there which satisfy all the following conditions:
a+c>b+d a+d≥b+c 0≤a≤A 0≤b≤B 0≤c≤C 0≤d≤D
Find the number of such quadruples. As the answer may be very large, it is sufficient to calculate it modulo 109+7.
The first line of input contains an integer T, the number of test cases (1≤T≤1000).
Each test case is given on a single line containing four integers A, B, C, and D (0≤A,B,C,D≤1018).
For each test case, output a single line with a single integer: the answer modulo 109+7.