#include<bits/stdc++.h>
#define MAXN 200005
#define INF 1000000000
#define MOD 1000000007
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<P,int> PP;
int n;
PP p[MAXN];
vector<pair<int,P> > v;
int calc_dist(int x,int y)
{
    return max(max(p[x].F.F-p[y].F.F,p[y].F.F-p[x].F.F),max(p[x].F.S-p[y].F.S,p[y].F.S-p[x].F.S));
}
int main()
{
    scanf("%d",&n);
    for(int i=0;i<n;i++) 
    {
        scanf("%d%d",&p[i].F.F,&p[i].F.S);
        p[i].S=i;
    }
    sort(p,p+n);
    v.push_back(make_pair(calc_dist(0,n-1),P(p[0].S,p[n-1].S)));
    v.push_back(make_pair(calc_dist(0,n-2),P(p[0].S,p[n-2].S)));
    v.push_back(make_pair(calc_dist(1,n-1),P(p[1].S,p[n-1].S)));
    for(int i=0;i<n;i++) swap(p[i].F.F,p[i].F.S);
    sort(p,p+n);
    v.push_back(make_pair(calc_dist(0,n-1),P(p[0].S,p[n-1].S)));
    v.push_back(make_pair(calc_dist(0,n-2),P(p[0].S,p[n-2].S)));
    v.push_back(make_pair(calc_dist(1,n-1),P(p[1].S,p[n-1].S)));
    sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
    printf("%d\n",v[v.size()-2].F);
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
// template <class T = ll> using P = pair< T,T>;
template <class T = ll> using V = vector<T>;
template <class T = ll> using VV = V<V<T>>;
#define rep(i,n) for(int i=0; i<(n);++i)
#define repp(i, l, r) for(int i = (l); i < (r); ++i)
#define pb push_back
#define all(v) (v).begin(), (v).end()


int main()
{
    int n;
    cin >> n;
    V<pair<int,int>> x(n);
    V<pair<int,int>> y(n);
    rep(i, n) {
        cin >> x[i].first >> y[i].first;
        x[i].second = i;
        y[i].second = i;
    }
    sort(all(x), greater<pair<int,int>>());
    sort(all(y), greater<pair<int,int>>());

    V<pair<pair<int,int>,int>> ans;
    {
        pair<pair<int,int>,int> can;
        pair<int,int> a;
        a.first = x[0].second;
        a.second = x[n-1].second;
        can.first = a;
        can.second = x[0].first - x[n-1].first;
        ans.push_back(can);
    }
        {
        pair<pair<int,int>,int> can;
        pair<int,int> a;
        a.first = y[0].second;
        a.second = y[n-1].second;
        can.first = a;
        can.second = y[0].first - y[n-1].first;
        ans.push_back(can);
    }
        {
        pair<pair<int,int>,int> can;
        pair<int,int> a;
        a.first = x[1].second;
        a.second = x[n-1].second;
        can.first = a;
        can.second = x[1].first - x[n-1].first;
        ans.push_back(can);
    }
        {
        pair<pair<int,int>,int> can;
        pair<int,int> a;
        a.first = x[0].second;
        a.second = x[n-2].second;
        can.first = a;
        can.second = x[0].first - x[n-2].first;
        ans.push_back(can);
    }
        {
        pair<pair<int,int>,int> can;
        pair<int,int> a;
        a.first = y[1].second;
        a.second = y[n-1].second;
        can.first = a;
        can.second = y[1].first - y[n-1].first;
        ans.push_back(can);
    }
        {
        pair<pair<int,int>,int> can;
        pair<int,int> a;
        a.first = y[0].second;
        a.second = y[n-2].second;
        can.first = a;
        can.second = y[0].first - y[n-2].first;
        ans.push_back(can);
    }
    sort(all(ans), [](auto lhs, auto rhs){return lhs.second > rhs.second;});
    ll cnt = 0;
    pair<int,int> pre;
    for(auto abc : ans){
        if(pre == abc.first) continue;
        cnt++;
        pre = abc.first;
        if(cnt == 2){
            cout << abc.second << endl;
        }
    }

    return 0;
}