Save the kitten
Arthur is participating in a TV show where contestants must complete various intellectual and physical tasks to earn points. In one of these tasks, Arthur needs to rescue a small kitten.
The task area is a rectangle measuring n×m meters, divided into unit squares. Arthur starts in one square, the kitten is in another, and an elevator is located in a third square. Arthur completes the task successfully if he stands on the elevator with the kitten.
In each step, Arthur can move to an adjacent square that shares a side with his current square. After moving, the square he previously occupied disappears and cannot be stepped on again. This includes the square where Arthur starts and the square where the kitten is located. Arthur's goal is to reach the kitten, pick it up, and then reach the elevator. The points he earns depend on the number of steps he takes, so he needs to minimize the number of steps.
Once Arthur determines the minimum number of steps required, he becomes curious about how many different ways there are to reach the kitten and then the elevator, using the minimum number of steps. Help him find this number. Since it can be quite large, Arthur asks for the result modulo 10^9+7.
Input
The first line of input contains two natural numbers n and m — the dimensions of the task area (2 ≤ n, m ≤ 100).
The second line contains two integers x_A and y_A — the coordinates of the square where Arthur starts (1 ≤ x_A ≤ n, 1 ≤ y_A ≤ m). The third line contains two integers x_K and y_K — the coordinates of the square where the kitten is located (1 ≤ x_K ≤ n, 1 ≤ y_K ≤ m). The fourth line contains two integers x_E and y_E — the coordinates of the square where the elevator is situated (1 ≤ x_E ≤ n, 1 ≤ y_E ≤ m). These three squares are distinct from each other.
Output
Output a single number — the number of ways to reach the kitten and then the elevator, without stepping on the same square twice, while taking the minimum number of steps. Print the result modulo 10^9+7.
Note to the example
Two possible paths for the field shown in the example.