#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (int)(n); i++) template bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;} template bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;} const long long mod=998244353; const long long mod2=469762049; const long long mod100=1000000007; struct Point{ ll x,y; }; bool operator<(const Point &a,const Point &b){ if(a.x!=b.x) return a.xsync_with_stdio(0); cin.tie(0); int N;cin>>N; Point P[N+1]; for(int i=1;i<=N;i++){ cin>>P[i].x>>P[i].y; ll a=P[i].x+P[i].y,b=P[i].x-P[i].y; P[i].x=a; P[i].y=b; } sort(P+1,P+N+1); Point dat[4]; for(int i=0;i<4;i++) dat[i]=P[1]; for(int i=1;i<=N;i++){ chmin(dat[0].x,P[i].x); chmin(dat[1].x,P[i].x); chmax(dat[2].x,P[i].x); chmax(dat[3].x,P[i].x); chmin(dat[0].y,P[i].y); chmin(dat[2].y,P[i].y); chmax(dat[1].y,P[i].y); chmax(dat[3].y,P[i].y); } rep(i,4){ //cout<m){ f=false; break; } } if(f){ check=true; break; } } if(check==true) break; } if(check) r=m; else l=m+1; } cout<