import sys from itertools import permutations from heapq import heappop,heappush from collections import deque import random import bisect from math import gcd input = lambda :sys.stdin.readline().rstrip() mi = lambda :map(int,input().split()) li = lambda :list(mi()) N = int(input()) xy = [] for _ in range(N): x,y = mi() xy.append(((x+y,x-y))) def cond_2sq(tmp_xy,D): if not tmp_xy: return True x_min,x_max = min(x for x,y in tmp_xy),max(x for x,y in tmp_xy) y_min,y_max = min(y for x,y in tmp_xy),max(y for x,y in tmp_xy) """ x_min,y_minを同時達成 or x_max,y_minを同時達成 """ for px,py in [(x_min,y_min),(x_max-D,y_min)]: tmp_x_min,tmp_x_max = x_max,x_min tmp_y_min,tmp_y_max = y_max,y_min for x,y in tmp_xy: if not px <= x <= px + D or not py <= y <= py + D: tmp_x_min = min(tmp_x_min,x) tmp_x_max = max(tmp_x_max,x) tmp_y_min = min(tmp_y_min,y) tmp_y_max = max(tmp_y_max,y) if (tmp_x_max-tmp_x_min) <= D and (tmp_y_max-tmp_y_min) <= D: return True return False res = 10**10 #print("xy",xy) for _ in range(4): x_min,y_min = min(x for x,y in xy),min(y for x,y in xy) #print(x_min,y_min) def cond_3sq(D): tmp_xy = [] #print(x_min,y_min) for x,y in xy: if not x_min <= x <= x_min+D or not y_min <= y <= y_min+D: tmp_xy.append((x,y)) #print(tmp_xy) return cond_2sq(tmp_xy,D) #print(cond_3sq(47)) ok = res ng = -1 while ok-ng>1: mid = (ok+ng)//2 if cond_3sq(mid): ok = mid else: ng = mid res = ok xy = [(-y,x) for x,y in xy] print(res)