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.
The input is given from Standard Input in the following format:
case case
For each test case, print the minimum possible total weight of the Manhattan minimum spanning tree on one line.
Move the point at to . A spanning tree can then be formed with two edges of weight .
Each case is given in the following format: