#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#include<tuple>
#include<cstring>
#include<bitset>

#define REP(i,n) for(ll i=0;i<(ll)n;i++)
#define ALL(x) (x).begin(),(x).end()
#define SZ(x) ((ll)(x).size())
#define pb push_back
#define eb emplace_back

#define INF 1000000000
#define INFLL 1000000000000000000LL

using namespace std;

template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

using ll = long long;
using PP = pair<ll, ll>;

#define MAX_N 200000

ll N;
PP x[MAX_N], y[MAX_N];
vector<ll> ans;
map<PP, ll> mp;

int main() {

	cin >> N;
	REP(i, N) {
		cin >> x[i].first >> y[i].first;
		x[i].second = i;
		y[i].second = i;
	}

	sort(x, x + N);
	sort(y, y + N);

	REP(i, 10)REP(j, 10) {
		if (i < N && 0 <= N - j && N - j < N && i != N - j) {
			ll f =max(x[i].second, x[N - j].second);
			ll s = min(x[i].second, x[N - j].second);
			chmax(mp[{f, s}], abs(x[i].first - x[N - j].first));
			f = max(y[i].second, y[N - j].second);
			s = min(y[i].second, y[N - j].second);
			chmax(mp[{f, s}], abs(y[i].first - y[N - j].first));
		}
	}

	for (auto&& m : mp) {
		ans.push_back(m.second);
	}

	sort(ALL(ans));

	cout << ans[SZ(ans) - 2] << endl;

	return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define mod 998244353   

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif

ll binpow(ll x,ll y)/* (x^y)%p in O(log y) */{ll res=1;while (y > 0){if(y&1)res=(res*x);y = y>>1;x=(x*x);}return res;}
ll binpowmod(ll x,ll y,ll p)/* (x^y)%p in O(log y) */{ll res=1;x=x%p;while (y > 0){if(y&1)res=(res*x)%p;y = y>>1;x=(x*x)%p;}return res;}
ll mod_inverse(ll n,ll p)/* Returns n^(-1) mod p */{return binpowmod(n,p-2,p);}
ll gcd(ll x,ll y)
{
    if(y==0)
        return x;
    return gcd(y,x%y);
}

bool isPowerOfTwo (ll x)  
{  
    /* First x in the below expression is for the case when x is 0 */
    return x && (!(x&(x-1)));  
}

void swap(int &x,int &y){
    int temp = x;
    x = y;
    y = temp;
}
  
unsigned int onesComplement(unsigned int n) 
{ 
   // Find number of bits in the given integer 
   int number_of_bits = floor(log2(n))+1; 
  
   // XOR the given integer with poe(2,  
   // number_of_bits-1 and print the result  
   return ((1 << number_of_bits) - 1) ^ n; 
}

bool comp1(pair<int,int> x, pair<int,int> y)
{
    return x.second < y.second;
}

// class cmp      //comrootator for priority_queue 
// {               //declaration: priority_queue<int,vector<int>,cmp>
// public:         
//     bool operator()(E& A,E& B)
//     {
//         // if(A.first == B.first)
//         //     return A.second < B.second;
//         return A.wt > B.wt;
//     }
// };


void solve(){   
    int n;
    cin >> n;
    vector<pair<ll,ll>> xy;
    for(int i = 0; i < n; ++i) {
        ll x, y; cin >> x >> y;
        xy.push_back({x, y});
    }
    sort(xy.begin(), xy.end());
    vector<ll> ans;
    for(int i = 1; i < n; ++i) {
        ll dist = max(abs(xy[i].first - xy[0].first), abs(xy[i].second - xy[0].second));
        ans.push_back(dist);
    }
    for(int i = n - 2; i >= 1; --i) {
        ll dist = max(abs(xy[i].first - xy[n - 1].first), abs(xy[i].second - xy[n - 1].second));
        ans.push_back(dist);
    }
    xy.pop_back();
    reverse(xy.begin(), xy.end());
    xy.pop_back();
    sort(xy.begin(), xy.end(),[](pair<ll,ll>& p, pair<ll,ll>& q){
        return p.second < q.second;
    });

    if(xy.size() >= 2) {
        n = xy.size();
        for(int i = 1; i < n; ++i) {
            ll dist = max(abs(xy[i].first - xy[0].first), abs(xy[i].second - xy[0].second));
            ans.push_back(dist);
        }
        for(int i = n - 2; i >= 1; --i) {
            ll dist = max(abs(xy[i].first - xy[n - 1].first), abs(xy[i].second - xy[n - 1].second));
            ans.push_back(dist);
        }
    }

    sort(ans.begin(), ans.end(), greater<ll>());
    cout << ans[1];

}   

int main()                   
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout << fixed << setprecision(15);
    // int t;
    // cin >> t;
    // while(t--){
    //     solve();
    // }
    solve();
  
}   