{"problem":{"name":"Dist Max 2","description":{"content":"Given are $N$ distinct points in a two-dimensional plane. Point $i$ $(1 \\leq i \\leq N)$ has the coordinates $(x_i,y_i)$. Let us define the distance between two points $i$ and $j$ be $\\mathrm{min} (|x_","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc215_f"},"statements":[{"statement_type":"Markdown","content":"Given are $N$ distinct points in a two-dimensional plane. Point $i$ $(1 \\leq i \\leq N)$ has the coordinates $(x_i,y_i)$.\nLet us define the distance between two points $i$ and $j$ be $\\mathrm{min} (|x_i-x_j|,|y_i-y_j|)$: the smaller of the difference in the $x$\\-coordinates and the difference in the $y$\\-coordinates.\nFind the maximum distance between two different points.\n\n## Constraints\n\n*   $2 \\leq N \\leq 200000$\n*   $0 \\leq x_i,y_i \\leq 10^9$\n*   $(x_i,y_i)$ $\\neq$ $(x_j,y_j)$ $(i \\neq j)$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$x_1$ $y_1$\n$x_2$ $y_2$\n$\\vdots$\n$x_N$ $y_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc215_f","tags":[],"sample_group":[["3\n0 3\n3 1\n4 10","4\n\nThe distances between Points $1$ and $2$, between Points $1$ and $3$, and between Points $2$ and $3$ are $2$, $4$, and $1$, respectively, so your output should be $4$."],["4\n0 1\n0 4\n0 10\n0 6","0"],["8\n897 729\n802 969\n765 184\n992 887\n1 104\n521 641\n220 909\n380 378","801"]],"created_at":"2026-03-03 11:01:13"}}