PROGRAMMING:Circuit wiring
When solving the problem of circuit wiring, a very common method is to overlay a grid on the wiring area, which divides the wiring area into m * n squares. When wiring, the right angle must be adopted at the corner. If a line has passed through a square, the overlay wiring is not allowed on the square. As shown in the figure below, when wiring from the center point of one grid a (2,1) to the center point of another grid B (8,8), each grid needs 1 unit of circuit material, and the minimum circuit material required is 16.
![ Circuit wiring. JPG] (~ / 05a0259f-d719-423d-b21e-f72fe9d6a0aa. JPG)
###Input format:
The first line inputs m and N of the grid
The second line begins to input the case that the grid has been wired. If there is already wiring, it is indicated by 1. If there is no wiring, it is indicated by 0.
The next two lines input the start position a and the end position B of the required wiring respectively.
###Output format:
The minimum circuit material required for wiring from the start position a to the end position B is output.
###Input example:
Here is a set of inputs. For example:
```in
8 8
1 1 1 1 1 1 1 1
0 0 0 0 0 1 1 1
1 0 1 1 0 0 0 1
1 0 1 1 0 1 1 0
1 0 1 1 1 1 1 1
1 0 1 1 0 0 0 1
1 0 0 0 0 1 0 0
1 1 1 1 1 1 1 0
2 1
8 8
```
###Output example:
The corresponding output is given here. For example:
```out
sixteen
```
answer:If there is no answer, please comment
![ Circuit wiring. JPG] (~ / 05a0259f-d719-423d-b21e-f72fe9d6a0aa. JPG)
###Input format:
The first line inputs m and N of the grid
The second line begins to input the case that the grid has been wired. If there is already wiring, it is indicated by 1. If there is no wiring, it is indicated by 0.
The next two lines input the start position a and the end position B of the required wiring respectively.
###Output format:
The minimum circuit material required for wiring from the start position a to the end position B is output.
###Input example:
Here is a set of inputs. For example:
```in
8 8
1 1 1 1 1 1 1 1
0 0 0 0 0 1 1 1
1 0 1 1 0 0 0 1
1 0 1 1 0 1 1 0
1 0 1 1 1 1 1 1
1 0 1 1 0 0 0 1
1 0 0 0 0 1 0 0
1 1 1 1 1 1 1 0
2 1
8 8
```
###Output example:
The corresponding output is given here. For example:
```out
sixteen
```
answer:If there is no answer, please comment