#include<bits/stdc++.h>
using namespace std;
#define ull unsigned long long int
#define ll long long int
#define mp make_pair
#define pb push_back
#define mod 1000000007
#define mem memset
#define ff first
#define ss second
#define loop0(i,n) for(i=0;i<n;i++)
#define loop1(i,n) for(i=1;i<=n;i++)
ll dist(pair<ll,ll> p1,pair<ll,ll> p2)
{
	return max(abs(p1.ff-p2.ff),abs(p1.ss-p2.ss));
}
int main()
{
	ll n,i,j,x,y,k,l,a,b;
	cin>>n;
	pair<pair<ll,ll>,ll> p[n],q[n];
	loop0(i,n)
	{
		cin>>x>>y;
		p[i]={{x,y},i};
		q[i]={{y,x},i};
	}
	sort(p,p+n);
	sort(q,q+n);
	priority_queue<ll> pq;
	map<pair<ll,ll>,ll> mp;
	ll ans;
	a=p[0].ss;b=p[n-1].ss;
	x=min(a,b);y=max(a,b);
	if(!mp[{x,y}])
	{
		pq.push(dist(p[0].ff,p[n-1].ff));
		mp[{x,y}]=1;
	}
	a=p[0].ss;b=p[n-2].ss;
	x=min(a,b);y=max(a,b);
	if(!mp[{x,y}])
	{
		pq.push(dist(p[0].ff,p[n-2].ff));
		mp[{x,y}]=1;
	}
	a=p[1].ss;b=p[n-1].ss;
	x=min(a,b);y=max(a,b);
	if(!mp[{x,y}])
	{
		pq.push(dist(p[1].ff,p[n-1].ff));
		mp[{x,y}]=1;
	}
	a=q[0].ss;b=q[n-1].ss;
	x=min(a,b);y=max(a,b);
	if(!mp[{x,y}])
	{
		pq.push(dist(q[0].ff,q[n-1].ff));
		mp[{x,y}]=1;
	}
	a=q[0].ss;b=q[n-2].ss;
	x=min(a,b);y=max(a,b);
	if(!mp[{x,y}])
	{
		pq.push(dist(q[0].ff,q[n-2].ff));
		mp[{x,y}]=1;
	}
	a=q[1].ss;b=q[n-1].ss;
	x=min(a,b);y=max(a,b);
	if(!mp[{x,y}])
	{
		pq.push(dist(q[1].ff,q[n-1].ff));
		mp[{x,y}]=1;
	}
	pq.pop();
	ans=pq.top();
	cout<<ans<<'\n';
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long int ull;
#include <fstream>
#define int long long int
#define mod 1000000007
#define watch(x) cout<<(#x)<<" is "<<(x)<<"\n"
#define watch2(x,y) cout<<(#x)<<" is "<<(x)<<" and "<<(#y)<< " is " <<(y)<<"\n"
int powerr(int m,int n){if(m==0 || n==1)return m;if(n==0)return 1;int ans = 1;if(n&1)ans = m*powerr(m,n-1);else {ans = powerr(m,n/2);ans = ans * ans;}return ans%mod;}
int gcdd(int a,int b){if(b==0)return a;   return gcdd(b,a%b);}
int lcmm(int a,int b){return (a*b)/gcdd(a,b);}
/*
signed main(){
    set<pair<int,int>> s;
    s.insert({1,2});
    s.insert({2,1});
    s.insert({1,2});
    cout<<s.size();
}
*/

signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int n;cin>>n;
    vector<pair<int,int>> x,y;
    vector<pair<int,int>> V;
    for(int i=0;i<n;++i){
        int x1,y1;cin>>x1>>y1;
        x.push_back({x1,i});
        y.push_back({y1,i});
        V.push_back({x1,y1});
    }
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());



    int diff1_x = abs(x[0].first - x[n-1].first);
    int diff2_x = abs(x[1].first - x[n-1].first);
    int diff3_x = abs(x[0].first - x[n-2].first);
    int ind1_x = x[0].second , ind2_x = x[1].second, ind3_x = x[n-2].second, ind4_x = x[n-1].second;

    int diff1_y = abs(y[0].first - y[n-1].first);
    int diff2_y = abs(y[1].first - y[n-1].first);
    int diff3_y = abs(y[0].first - y[n-2].first);
    int ind1_y = y[0].second , ind2_y = y[1].second, ind3_y = y[n-2].second, ind4_y = y[n-1].second;


    set<pair<int,int>> soul;

    if(ind1_x < ind4_x){
        soul.insert({ind1_x,ind4_x});
    }
    else {
        soul.insert({ind4_x,ind1_x});
    }

    if(ind1_x < ind3_x){
        soul.insert({ind1_x,ind3_x});
    }
    else {
        soul.insert({ind3_x,ind1_x});
    }

    if(ind2_x < ind4_x){
        soul.insert({ind2_x,ind4_x});
    }
    else {
        soul.insert({ind4_x,ind2_x});
    }

    //reyy

    if(ind1_y < ind4_y){
        soul.insert({ind1_y,ind4_y});
    }
    else {
        soul.insert({ind4_y,ind1_y});
    }

    if(ind1_y < ind3_y){
        soul.insert({ind1_y,ind3_y});
    }
    else {
        soul.insert({ind3_y,ind1_y});
    }

    if(ind2_y < ind4_y){
        soul.insert({ind2_y,ind4_y});
    }
    else {
        soul.insert({ind4_y,ind2_y});
    }

    vector<int> vec;
    for(auto x:soul){
        int a = x.first , b = x.second;
        vec.emplace_back( max( abs(V[a].first-V[b].first) , abs(V[a].second - V[b].second) ) );
    }

    sort(vec.begin(),vec.end());
    if(vec.size()==1 || vec.size()==2){
        cout<<vec[0];return 0;
    }
    cout<<vec[vec.size()-2];

    return 0;

}

