#include<bits/stdc++.h>
using namespace std;

#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vll vector<ll>
#define vpii vector<pair<int,int>>
#define vpll vector<pair<ll,ll>>
#define fr(i,k,n) for (int i = k; i < n; ++i)
#define fri(i,k,n) for (int i = k; i >= n; --i)
#define pb push_back
#define mp make_pair
#define all(arr) arr.begin(),arr.end()
#define ff first
#define ss second

const double pi=3.1415926535897932384626433832795;
const int inf=1e9;
const ll inf2=1e18;
const int mod=1e9+7;

void boost(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
}

void solve(){
    vll d;
    int n;
    cin>>n;
    vpll arr(n);
    vpll x(n),y(n);
    fr(i,0,n){
        cin>>arr[i].ff>>arr[i].ss;
        x[i]={arr[i].ff,i};
        y[i]={arr[i].ss,i};
    }   
    sort(all(x));
    sort(all(y));
    int a=n-1,b=n-2;
    for(int i=0;i<n-1;i++){
        if(abs(x[i].ff-x[a].ff)>=abs(arr[x[i].ss].ss-arr[x[a].ss].ss)){
            d.pb(abs((x[i].ff-x[a].ff)));
        }
        if(i!=b && abs(x[i].ff-x[b].ff)>=abs(arr[x[i].ss].ss-arr[x[b].ss].ss)){
            d.pb(abs((x[i].ff-x[b].ff)));
        }
        if(abs(y[i].ff-y[a].ff)>abs(arr[y[i].ss].ff-arr[y[a].ss].ff)){
            d.pb(abs((y[i].ff-y[a].ff)));
        }
        if(i!=b && abs(y[i].ff-y[b].ff)>abs(arr[y[i].ss].ff-arr[y[b].ss].ff)){
            d.pb(abs((y[i].ff-y[b].ff)));
        }
    }
    sort(all(d),greater<ll>());
    cout<<d[1]<<endl;
    return;
}

int main()
{
    boost();
    
    int tc=1;
    //cin>>tc;
    while(tc--)
        solve();
    return 0;
}
#include<bits/stdc++.h>

template<class T>
using pq_inv = std::priority_queue<T, std::vector<T>, std::greater<>>;

int main(){
    using namespace std;
    unsigned long N;
    cin >> N;
    vector<pair<unsigned long, unsigned long>> house(N);
    for(auto&& [x, y] : house){
        cin >> x >> y;
        x += 1000000000;
        y += 1000000000;
    }
    const auto dist{[&house](const auto& i){
        return max(max(house[i.first].first, house[i.second].first) - min(house[i.first].first, house[i.second].first), max(house[i.first].second, house[i.second].second) - min(house[i.first].second, house[i.second].second));
    }};
    const auto cmp{[&dist](const auto& i, const auto& j){
        return dist(i) == dist(j) ? i > j : dist(i) > dist(j);
    }};
    set<pair<unsigned long, unsigned long>, decltype(cmp)> pq(cmp);
    vector<unsigned long> idx(N);
    iota(begin(idx), end(idx), 0UL);
    sort(begin(idx), end(idx), [&house](auto i, auto j){return house[i] < house[j];});
    pq.emplace(idx[0], idx[N - 1]);
    pq.emplace(idx[1], idx[N - 1]);
    pq.emplace(idx[0], idx[N - 2]);
    sort(begin(idx), end(idx), [&house](auto i, auto j){return house[i].second == house[j].second ? house[i].first < house[j].first : house[i].second < house[j].second;});
    pq.emplace(idx[0], idx[N - 1]);
    pq.emplace(idx[1], idx[N - 1]);
    pq.emplace(idx[0], idx[N - 2]);
    cout << dist(*next(pq.begin())) << endl;
    return 0;
}
