#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2,fma,tune=native")

#define ll long long
#define int ll
#define ull unsigned ll
#define ld long double
#define rep(a) rep1(i,a)
#define rep1(i,a) rep2(i,0,a)
#define rep2(i,b,a) for(int i=(b); i<((int)(a)); i++)
#define rep3(i,b,a) for(int i=(b); i>=((int)(a)); i--)
#define all(a) a.begin(),a.end()
#define pii pair<int,int>
#define pb push_back
//#define inf 1010000000
#define inf 4000000000000000000
#define eps 1e-9
#define sz(a) ((int)a.size())
#define pow2(x) (1ll<<(x))
#define ceiling(a,b) (((a)+(b)-1)/(b))
#define print0(a) cout << (a) << ' '
#define ykh mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
#ifdef i_am_noob
#define bug(...) cerr << "#" << __LINE__ << ' ' << #__VA_ARGS__ << "- ", _do(__VA_ARGS__)
template<typename T> void _do(vector<T> x){for(auto i: x) cerr << i << ' ';cerr << "\n";}
template<typename T> void _do(set<T> x){for(auto i: x) cerr << i << ' ';cerr << "\n";}
template<typename T> void _do(T && x) {cerr << x << endl;}
template<typename T, typename ...S> void _do(T && x, S&&...y) {cerr << x << ", "; _do(y...);}
#else
#define bug(...) 826
#endif
template<typename T> void print(T && x) {cout << x << "\n";}
template<typename T, typename... S> void print(T && x, S&&... y) {cout << x << ' ';print(y...);}

const int Mod=1000000007,Mod2=998244353;
const int MOD=Mod2;
const int maxn=200005;

//i_am_noob
//#define wiwihorz  
int n,a[maxn],b[maxn],c[4];
bool vis[maxn];

void orzck(){
    cin >> n;
    rep(n) cin >> a[i] >> b[i];
    c[0]=min_element(a,a+n)-a;
    c[1]=max_element(a,a+n)-a;
    c[2]=min_element(b,b+n)-b;
    c[3]=max_element(b,b+n)-b;
    vector<int> vec;
    rep1(j,4){
        vis[c[j]]=1;
        rep(n) if(!vis[i]) vec.pb(max(abs(a[i]-a[c[j]]),abs(b[i]-b[c[j]])));
    }
    sort(all(vec));
    print(vec[sz(vec)-2]);
}

signed main(){
    ios_base::sync_with_stdio(0),cin.tie(0);
    #ifdef i_am_noob
    freopen("input1.txt","r",stdin);
    freopen("output1.txt","w",stdout);
    freopen("output2.txt","w",stderr);
    #endif
    cout << fixed << setprecision(15);
    int t;
    #ifdef wiwihorz
    cin >> t;
    #else
    t=1;
    #endif
    while(t--) orzck();
    return 0;
}
#include<bits/stdc++.h>
#include<iostream>
#include<set>
#include<map>
#include<iterator>
using namespace std;


///defines.....
#define ll              long long
#define lli             long long int
#define pb              push_back
#define mp              make_pair
#define RIP(i,n)        for(ll i=0; i<n; i++)
#define F(i,a,b)        for(int i=a; i<b; i++)
#define RIP1(i,n)       for(int i=(n-1); i>=0; i--)
#define FOR(i,a,b)      for(int i=a;i<(b); i++)
#define FOR1(i,a,b)     for(int i=a; i>=(b); i--)
#define sc(a)           scanf("%lld",&a)
#define SC(a)           scanf("%d",&a)
#define cin(a)          cin >> a
#define cout(a)         cout << a
#define pi              acos(-1)
#define pr(a)           printf("%lld\n",a)
#define PR(a)           printf("%lld ",a)
#define s(a,b)          sort(a,b)
#define sz(x)           (int)(x).size()
#define nl              '\n'

///Constants........
const ll mod = 1e9+7;
const int Max = 1e5+5;
const ll IFN = 1e18+5;


///Chess moves.........
 int dx[] = {+0, +0, -1, +1}; ///Up-down, Left-Right
 int dy[] = {+1, -1, +0, +0};
// int dx[] = {+0,+0,+1,-1,-1,+1,-1,+1}; ///King's Move
// int dy[] = {-1,+1,+0,+0,+1,+1,-1,-1};
// int dx[] = {-2, -2, -1, -1,  1,  1,  2,  2}; ///Knight's Move
// int dy[] = {-1,  1, -2,  2, -2,  2, -1,  1};

inline void norm(ll &a) {a%=mod; (a<0) && (a+=mod) ;}
inline ll modAdd(ll a,ll b) {a%=mod, b%=mod; norm(a),norm(b); return (a+b)%mod;}
inline ll modSub(ll a,ll b) {a%=mod, b%=mod; norm(a),norm(b); return (a-b)%mod;}
inline ll modMul(ll a,ll b) {a%=mod, b%=mod; norm(a),norm(b); return (a*b)%mod;}

///Functions..........
ll bigmod(ll a, ll p, ll M)
{
	p %= (M-1);

	ll result = 1LL;
	while(p>0LL){
		if(p&1LL) result = result * a % M;
		a = a * a % M;
		p>>=1LL;
	}
	return result;
}

ll gcd(ll a, ll b){ while (b){ a %= b; swap(a, b);} return a;}
ll lcm(ll a, ll b){ return (a/gcd(a, b)*b);}

ll inverse(ll a, ll M){
	if(gcd(a, M)==1) return bigmod(a, M-2, M) % M;
	return 1;
}
ll ncr(ll a, ll b){ ll x = max(a-b, b), ans=1; for(ll K=a, L=1; K>=x+1; K--, L++){ ans = ans * K % mod; ans = ans * inverse(L, mod) % mod;} return ans;}


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

/* void solve()
{

}*/


/// Code goes from here ::::::>

int main()
{

    /*#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif*/

    int t=1;
    //cin >> t;
    while(t--)
    {
        ll n;
        cin >> n;
        vector<pair<ll,ll>>v1,v2;
        ll a,b;
        RIP(i,n)
        {
            cin >> a >> b;
            v1.pb({a,i});
            v2.pb({b,i});
        }
        sort(v1.begin(),v1.end());
        sort(v2.begin(),v2.end());
        vector<pair<ll,pair<ll,ll>>>v;
        v.pb({abs(v1[n-1].first-v1[0].first),{v1[n-1].second,v1[0].second}});
         v.pb({abs(v1[n-1].first-v1[1].first),{v1[n-1].second,v1[1].second}});
          v.pb({abs(v1[n-2].first-v1[0].first),{v1[n-2].second,v1[0].second}});
          v.pb({abs(v2[n-1].first-v2[0].first),{v2[n-1].second,v2[0].second}});
         v.pb({abs(v2[n-1].first-v2[1].first),{v2[n-1].second,v2[1].second}});
          v.pb({abs(v2[n-2].first-v2[0].first),{v2[n-2].second,v2[0].second}});

          sort(v.begin(),v.end());
          reverse(v.begin(),v.end());
          ll x1 = v[0].second.first;
          ll y1 = v[0].second.second;
          ll x2 = v[1].second.first;
          ll y2 = v[1].second.second;
          if(x1!=x2 || y1!=y2)
          {
              cout << v[1].first << nl;
          }
          else
          {
              cout << v[2].first << nl;
          }
    }





    ///<<<<<Khel khotom>>>>>
}



