Scube is playing a game in this game he has a grid of N rows and M columns. There is a Rat placed in one of the cells and two packets of chips placed in other two different cells.
The Rat is really hungry and he wants to get to a chips packet as fast as possible. He can walk in four directions: up, down, left or right. The paradox of the Rat is that if the both packets are equally close to him he won't be able to decide which one to choose and he will starve to death.
You are given the cells of the chips packets, but you don't know where the Rat is. Compute the number of cells where the Rat will starve if he's there.
Standard input
The first line contains the two integers N and M.
The second line contains two integers representing the row and the column of the first chips packet.
The third line contains two integers representing the row and the column of the second chips packet.
Standard output
Output a single number representing the number of cells where the Rat will starve if he's there.
Constraints and notes
2≤N,M≤200
The Rat and the chips packets are situated in three different cells.
The Rat takes into consideration only shortest routes to the chips packets.
These are the points which are at equal distance from both the chips packets (1,1) (2,2) (2,3) (2,4) (3,2) (3,3) (3,4) (4,2) (4,3) (4,4)