AT_abc419_c [ABC419C] King's Summit
Description
There is a grid with $ 10^9 $ rows and $ 10^9 $ columns. Let $ (i, j) $ denote the square at the $ i $ -th row from the top and $ j $ -th column from the left.
There are $ N $ people on the grid. Initially, the $ i $ -th person is at square $ (R_i, C_i) $ .
The time starts at $ 0 $ . Each person can do the following move at times $ 1, 2, 3, 4, \ldots $ .
- Stay at the current position, or move to an $ 8 $ -adjacent square. It is forbidden to leave the grid. Formally, let square $ (i, j) $ be the current square, and move to one of the squares $ (i - 1, j - 1), (i - 1, j), (i - 1, j + 1), (i, j - 1), (i, j), (i, j + 1), (i + 1, j - 1), (i + 1, j), (i + 1, j + 1) $ that exists. Assume that the move takes no time.
Find the minimum possible time when the $ N $ people are at the same square.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ R_1 $ $ C_1 $ $ R_2 $ $ C_2 $ $ \vdots $ $ R_N $ $ C_N $
Output Format
Output the answer.
Explanation/Hint
### Sample Explanation 1
All people will be at square $ (5, 4) $ at time $ 3 $ if each person moves as follows.
- At time $ 1 $ , the 1st person moves to square $ (3, 4) $ , the 2nd person moves to square $ (6, 2) $ , and the 3rd person moves to square $ (7, 2) $ .
- At time $ 2 $ , the 1st person moves to square $ (4, 4) $ , the 2nd person moves to square $ (5, 3) $ , and the 3rd person moves to square $ (6, 3) $ .
- At time $ 3 $ , the 1st person moves to square $ (5, 4) $ , the 2nd person moves to square $ (5, 4) $ , and the 3rd person moves to square $ (5, 4) $ .
### Sample Explanation 2
All people start at the same square.
### Constraints
- $ 1 \leq N \leq 2 \times 10^5 $
- $ 1 \leq R_i, C_i \leq 10^9 $
- All input values are integers.