#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for(int i = 0; i < n; i++)
const int mod = 1000000007;

int main()
{
    int n;
    cin >> n;
    ll x1,x2,x3,x4,y1,y2,y3,y4;
    x1 = x2 = y1 = y2 = -1e9-1;
    x3 = x4 = y3 = y4 = 1e9+1;
    int x11,x22,x33,x44,y11,y22,y33,y44;

    rep(i,n){
        ll x,y;
        cin >> x >> y;
        if(x>=x1){
            x2 = x1;
            x22 = x11;
            x1 = x;
            x11 = i;
        }
        else if(x>=x2){
            x2 = x;
            x22 = i;
        }
        if(x<=x4){
            x3 = x4;
            x33 = x44;
            x4 = x;
            x44 = i;
        }
        else if(x<=x3){
            x3 = x;
            x33 = i;
        }
        if(y>=y1){
            y2 = y1;
            y22 = y11;
            y1 = y;
            y11 = i;
        }
        else if(y>=y2){
            y2 = y;
            y22 = i;
        }
        if(y<=y4){
            y3 = y4;
            y33 = y44;
            y4 = y;
            y44 = i;
        }
        else if(y<=y3){
            y3 = y;
            y33 = i;
        }
    }
    vector<ll> ans;
    if(x11 == y11 && x33 == y33){
        ans.push_back(max(x1-x3,y1-y3));
    }
    else{
        ans.push_back(x1-x3);
        ans.push_back(y1-y3);
    }
    
    if(x11 == y11 && x44 == y44){
        ans.push_back(max(x1-x4,y1-y4));
    }
    else{
        ans.push_back(x1-x4);
        ans.push_back(y1-y4);
    }
    
    if(x22 == y22 && x33 == y33){
        ans.push_back(max(x2-x3,y2-y3));
    }
    else{
        ans.push_back(x2-x3);
        ans.push_back(y2-y3);
    }

    if(x22 == y22 && x44 == y44){
        ans.push_back(max(x2-x4,y2-y4));
    }
    else{
        ans.push_back(x2-x4);
        ans.push_back(y2-y4);
    }
    sort(ans.rbegin(),ans.rend());
    cout << ans[1] << endl;
    return 0;
}
//Don't act like a loser.
//This code is written by huayucaiji
//You can only use the code for studying or finding mistakes
//Or,you'll be punished by Sakyamuni!!!
#include<bits/stdc++.h>
#define int long long
using namespace std;

int read() {
	char ch=getchar();
	int f=1,x=0;
	while(ch<'0'||ch>'9') {
		if(ch=='-')
			f=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9') {
		x=x*10+ch-'0';
		ch=getchar();
	}
	return f*x;
}

const int MAXN=2e5+10;

int n;
priority_queue<int> q;
struct point {
	int x,y,id;
}p[MAXN];
map<pair<int,int>,bool> mp;

int dist(point a,point b) {
	return max(abs(a.x-b.x),abs(a.y-b.y));
}

bool cmpx(point a,point b) {
	if(a.x!=b.x)
		return a.x<b.x;
	return a.y<b.y;
}
bool cmpy(point a,point b) {
	if(a.y!=b.y)
		return a.y<b.y;
	return a.x<b.x;
}
pair<int,int> mk(int a,int b) {
	return make_pair(max(a,b),min(a,b));
}

void get(point a,point b) {
	if(!mp[mk(a.id,b.id)]) {
		mp[mk(a.id,b.id)]=1;
		q.push(dist(a,b));
	}
}

signed main() {
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	
	cin>>n;
	for(int i=1;i<=n;i++) {
		p[i].x=read();p[i].y=read();
		p[i].id=i;
	}
	
	sort(p+1,p+n+1,cmpx);
	get(p[1],p[n]);
	get(p[1],p[n-1]);
	get(p[2],p[n]);
	
	sort(p+1,p+n+1,cmpy);
	get(p[1],p[n]);
	get(p[1],p[n-1]);
	get(p[2],p[n]);
	
	q.pop();
	cout<<q.top()<<endl;

	//fclose(stdin);
	//fclose(stdout);
	return 0;
}
