There are distinct integer points on the coordinate plane. The distance between and is their Manhattan distance .
You must choose exactly one of the given points and move it to any integer point. After the move, consider a minimum spanning tree whose vertices are the resulting points.
Find the minimum possible total weight of this minimum spanning tree. You may move the chosen point to its original position or to the same coordinates as another point.
Input
The input is given from Standard Input in the following format:
case case case
Each case is given in the following format:
Output
For each test case, print the minimum possible total weight of the Manhattan minimum spanning tree on one line.
Constraints
- .
- .
- ().
- ().
- The sum of over all test cases does not exceed .
Subtasks
Samples
Move the point at to . A spanning tree can then be formed with two edges of weight .