#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define Rep(i,j,n) for(int i = j; i < (int)(n); i++)
using Graph = vector<vector<int>>;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

int main(){
    int n; cin >> n;
    vector<pair<int,int>> x(n), y(n);
    rep(i,n) cin >> x[i].first >> y[i].first;
    rep(i,n){
        x[i].second = i;
        y[i].second = i;
    }
    sort(x.begin(), x.end());
    sort(y.begin(), y.end());
    int ans = max(max(abs(x[1].first - x[n-1].first), abs(x[0].first - x[n-2].first)), max(abs(y[1].first - y[n-1].first), abs(y[0].first - y[n-2].first )));
    if(x[n-1].second == y[n-1].second && x[0].second == y[0].second){
        cout << ans << endl;
    }else{
        cout << max( min(abs(x[n-1].first - x[0].first), abs(y[n-1].first - y[0].first)),ans)  << endl;
    }

    return 0;

}
#include <bits/stdc++.h>
#define int long long
#define mod 1000000007
#define read(a) for(auto &x : a) cin >> x
#define all(a) a.begin(), a.end()
#define write(a) for(auto x : a) cout << x << " ";cout << endl
#define heap priority_queue<pair<int, int>,  vector<pair<int, int>>, cmp>
using namespace std;

#ifndef ONLINE_JUDGE
#define deb(x) {cerr << #x <<" = "; _print(x); cerr << endl;}
#else
#define deb(x)
#endif

typedef long long ll;
typedef unsigned long long ull;
typedef long double lld;

// void _print(int t) {cerr << t;}
void _print(ll t) {cerr << t;}
void _print(string t) {cerr << t;}
void _print(char t) {cerr << t;}
void _print(lld t) {cerr << t;}
void _print(double t) {cerr << t;}
void _print(ull t) {cerr << t;}

template <class T, class V> void _print(pair <T, V> p);
template <class T> void _print(vector <T> v);
template <class T> void _print(set <T> v);
template <class T, class V> void _print(map <T, V> v);
template <class T> void _print(multiset <T> v);
template <class T, class V> void _print(pair <T, V> p) {cerr << "{"; _print(p.first); cerr << ","; _print(p.second); cerr << "}";}
template <class T> void _print(vector <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
template <class T> void _print(set <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
template <class T> void _print(multiset <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
template <class T, class V> void _print(map <T, V> v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";}

vector<pair<int, int>> merge(vector<pair<int, int>> &v1, vector<pair<int, int>> &v2, vector<pair<int, int>> &a){
    vector<pair<int, int>> ans;
    for(auto p : v1){
        int total = count(all(v1), p) + count(all(v2), p);
        total = min(total, (int)count(all(a), p));
        int already = count(all(ans), p);
        while(already < total){
            ans.push_back(p);
            already++;
        }
    }
    for(auto p : v2){
        int total = count(all(v1), p) + count(all(v2), p);
        total = min(total, (int)count(all(a), p));
        int already = count(all(ans), p);
        while(already < total){
            ans.push_back(p);
            already++;
        }
    }
    return ans;
}

main(){
    ios_base::sync_with_stdio(0);cin.tie(0); cout.tie(0);
    int n; cin >> n;
    vector<pair<int, int>> a(n), vec, vec2;
    // set<pair<int, int>> pos;
    for(auto &p : a) cin >> p.first >> p.second;

    sort(all(a));
    for(int i = 0; i < 3; i++){
        vec.push_back(a[i]);
        vec.push_back(a[n - 1 - i]);
    }

    for(auto &p : a) swap(p.first, p.second);
    sort(all(a));
    for(auto &p : a) swap(p.first, p.second);

    for(int i = 0; i < 3; i++){
        vec2.push_back(a[i]);
        vec2.push_back(a[n - 1 - i]);
    }
    vector<int> ans;
    // for(auto p : pos) vec.push_back(p);
// deb(vec);
// deb(vec2);
    vec = merge(vec, vec2, a);
// deb(vec);

    for(int i = 0; i < (int)vec.size(); i++){
        for(int j = i + 1; j < (int)vec.size(); j++){
            int dx = llabs(vec[i].first - vec[j].first);
            int dy = llabs(vec[i].second - vec[j].second);
            int d = max(dx, dy);
            ans.push_back(d);
        }
    }
    sort(all(ans));
    assert(ans.size() >= 2);
    // deb(ans);

    cout << ans[ans.size() - 2] << endl;
    return 0;
}