It is Monday morning and students are finding it very difficult to get out of their bed and attend the classes early around 9 a.m. Somehow all students are getting ready to attend the classes because they don't want to have their attendance below 75%.
Students who are night owls are finding it very difficult to stay awake in the class while the teacher is teaching. So, they decided to escape in the middle of the lecture to get some sleep. The class can be imagined in the form of a grid of n rows and m columns. The distance between two adjacent rows or two adjacent columns are both 1 unit each.
You are given the coordinates of student who is a night owl. The classroom door is at the coordinate (n, m). Since you are brilliant at solving problems, your task is to determine the number of ways in which the student can escape from the lecture provided that the student can only move 1 step/unit at a time. Also, the student can move only towards the door, so as to decrease the distance between his/her position and the door.
Since the answer can be very large, print the answer modulo 10^9 + 7.
Note: the position of the student will not be the same as that of the door.
Input:
First line contains an integer t denoting the number of test cases. Each of the next t lines contain 4 space-separated integers in the form of n m x y, denoting the number of rows, number of columns, the x coordinate of the student and the y coordinate of the student respectively.
Output:
Print t lines, each line containing the answer to the problem.
Constraints:
1 <= t <= 10^5
2 <= n, m <= 10^6
1 <= x < n
1 <= y < m
Problem Setter:
Devesh Jagwani