A mage from Slytherin decided to obtain extra power by conjuring dark energies.
Consider the cell with integer coordinates (X,Y) as the set of the points such as X \le x \le X+1 and Y \le y \le Y+1, (i.e 1 \times 1 square).
There are three cells with sources of power on the plane, painted in red. To perform the ritual, the mage shall paint some other cells in red to create the connected set of the red cells, containing all three power sources.
The set of cells is considered connected, if for any two cells in the set exists the sequence of the cells, starting at one of those cells, ending in another, such as any two neighboring cells in the sequence share an edge.
Because painting each cell costs a lot of power to the mage, he asks you to find the minimal number of cells to be painted to perform his ritual.
First line of the input contains six integers x_1 , y_1, x_2, y_2, x_3, y_3 — coordinates of the given cells (0 \le x_1,y_1,x_2,y_2,x_3,y_3 \le 100). You may assume that the given cells are pairwise distinct.
Print one integer — the minimum number of cells to be painted to create a connected set of cells containing all three power sources.
Example 1