#abc215f. [abc215_f]Dist Max 2

[abc215_f]Dist Max 2

Problem Statement

Given are NN distinct points in a two-dimensional plane. Point ii (1leqileqN)(1 \\leq i \\leq N) has the coordinates (xi,yi)(x_i,y_i).

Let us define the distance between two points ii and jj be mathrmmin(xixj,yiyj)\\mathrm{min} (|x_i-x_j|,|y_i-y_j|): the smaller of the difference in the xx-coordinates and the difference in the yy-coordinates.

Find the maximum distance between two different points.

Constraints

  • 2leqNleq2000002 \\leq N \\leq 200000
  • 0leqxi,yileq1090 \\leq x_i,y_i \\leq 10^9
  • (xi,yi)(x_i,y_i) neq\\neq (xj,yj)(x_j,y_j) (ineqj)(i \\neq j)
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN x1x_1 y1y_1 x2x_2 y2y_2 vdots\\vdots xNx_N yNy_N

Output

Print the maximum distance between two different points.


Sample Input 1

3
0 3
3 1
4 10

Sample Output 1

4

The distances between Points 11 and 22, between Points 11 and 33, and between Points 22 and 33 are 22, 44, and 11, respectively, so your output should be 44.


Sample Input 2

4
0 1
0 4
0 10
0 6

Sample Output 2

0

Sample Input 3

8
897 729
802 969
765 184
992 887
1 104
521 641
220 909
380 378

Sample Output 3

801