// for(int i = 0; i < n; i++) {cin >> a[i];}

#include <bits/stdc++.h>

using namespace std;

#define pb	push_back
#define mp	make_pair
#define gcd __gcd
#define F   first
#define S   second
#define pii pair<int,int>

using ll = long long;

bool isSubsequence(string s, string t) {
	int index = 0;
	if(s.length() == 0) {
		return true;
	}
	for(int i = 0; i < (int) t.length(); i++) {
		if(s.at(index) == t.at(i)){
			index++;
		}
		if(index == (int) s.length()) {
			return true;
		}
	}
	return false;
}

bool isPrime(int n) {
	for(int i = 2; i < int(sqrt(n))+1; i++) {
		if(n%i==0) {
			return false;
		}
	}
	return true;
}

bool isPrime(ll n) {
	for(ll i = 2; i < ll(sqrt(n))+1; i++) {
		if(n%i==0) {
			return false;
		}
	}
	return true;
}

bool isInt(double n) {
	if(floor(n) == ceil(n)) {
		return true;
	}
	return false;
}

bool isPalindrome(string s) {
	int n = s.length();
	for(int i = 0; i < n/2; i++) {
		if(s.at(i) != s.at(n-i-1)) {
			return false;
		}
	}
	return true;
}

bool distinctDigits(int n) {
	string s = to_string(n);
	for(int i = 0; i < (int) s.length(); i++) {
		for(int j = i+1; j < (int) s.length(); j++) {
			if(s.at(i)==s.at(j)) {
				return false;
			}
		}
	}
	return true;
}

bool distinctDigits(string s) {
	for(int i = 0; i < (int) s.length(); i++) {
		for(int j = i+1; j < (int) s.length(); j++) {
			if(s.at(i)==s.at(j)) {
				return false;
			}
		}
	}
	return true;
}

int digitSum(int n) {
	int ans = 0;
	string s = to_string(n);
	for(int i = 0; i < (int) s.length(); i++) {
		ans += stoi(s.substr(i, 1));
	}
	return ans;
}

int swapBits(int n, int p1, int p2) {
	int bit1 = (n >> p1) & 1;
	int bit2 = (n >> p2) & 1;

	int x = bit1 ^ bit2;
	x = (x << p1) | (x << p2);

	return n ^ x;
}

void display(vector<auto> a) {
	for(auto element : a) {
		cout << element << ' ';
	}
	cout << endl;
}

void solve()
{
	ll n;
	cin >> n;
	vector<ll> x(n);
	vector<ll> y(n);

	for(int i = 0; i < n; i++) {
		ll xi, yi;
		cin >> xi >> yi;
		x[i] = xi;
		y[i] = yi;
	}

	vector<vector<ll>> houses;
	for(int i = 0; i < n; i++) {
		houses.pb({x[i], y[i], i});
	}

	vector<vector<ll>> maxes;

	sort(houses.begin(), houses.end(),
		[] (vector<ll> a, vector<ll> b) {
			return a[0] > b[0];
		});

	// for(int i = 0; i < n; i++) {
	// 	display(houses[i]);
	// }

	maxes.pb({houses[0][0] - houses[n-1][0], houses[0][2], houses[n-1][2]});
	maxes.pb({houses[0][0] - houses[n-2][0], houses[0][2], houses[n-2][2]});
	maxes.pb({houses[1][0] - houses[n-1][0], houses[1][2], houses[n-1][2]});

	sort(houses.begin(), houses.end(),
		[] (vector<ll> a, vector<ll> b) {
			return a[1] > b[1];
		});

	// for(int i = 0; i < n; i++) {
	// 	display(houses[i]);
	// }

	maxes.pb({houses[0][1] - houses[n-1][1], houses[0][2], houses[n-1][2]});
	maxes.pb({houses[0][1] - houses[n-2][1], houses[0][2], houses[n-2][2]});
	maxes.pb({houses[1][1] - houses[n-1][1], houses[1][2], houses[n-1][2]});

	sort(maxes.begin(), maxes.end(),
		[] (vector<ll> a, vector<ll> b) {
			return a[0] > b[0];
		});

	// for(int i = 0; i < 6; i++) {
	// 	display(maxes[i]);
	// }

	if(maxes[1][1] == maxes[0][1] && maxes[1][2] == maxes[0][2]) {
		cout << maxes[2][0];
	} else {
		cout << maxes[1][0];
	}
}

int main() {
	ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	// int t;
	// cin >> t;
	// for(int i = 1; i <= t; i++) {
	// 	// cout << "Case #" << i << ": ";
	// 	solve();
	// }

	solve();

	cout.flush();
	return 0;
}

/*
			Saturday 29 May 2021 05:32:07 PM IST
					@uthor::astrainL3gi0N
*/

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

typedef long long int ll;
typedef std::vector<int> vi;
typedef std::pair<int,int> ii;
typedef std::vector<ii> vii;
typedef std::vector<ll> vl;

#define pb push_back
#define mp make_pair
#define debg(x)	std::cerr<<(#x)<<" => "<<x<<'\n';
#define debgg(x,y)	std::cerr<<(#x)<<" => "<<x<<'\t'<<(#y)<<' '<<y<<'\n';
#define len(a) (int)(a).size()
#define all(x) x.begin(),x.end()
const int mod = 1000000007;
//const int mod = 998244353;

bool comp (ii x, ii y) {
    if (x.second == y.second)
        return x.first < y.first;
    return x.second < y.second;
}
template < typename T> void  printv (T &a) {
    cout<<'\n';
    for (auto it = a.begin(); it != a.end(); ++it)
        cout<<it->first<<' '<<it->second<<'\n';
}
int gint() {
    int n;  cin>>n;
    return n;
}
//int t[510][510];
ll ans;

void solve () {
    map <ii,int> hmp;
    map <int,ii> mph;
    int n = gint();
    vii vpr;
    for (int i = 0;i < n;++i) {
        int x = gint();
        int y = gint();
        vpr.pb(mp(x,y));
        hmp[mp(x,y)] = i+1;
        mph[i+1] = mp(x,y);
    }
    vi vr;
    set <int> hsh;

    sort(all(vpr));
    hsh.insert(hmp[vpr[0]]);
    hsh.insert(hmp[vpr[1]]);
    hsh.insert(hmp[vpr[n-1]]);
    hsh.insert(hmp[vpr[n-2]]);
    for (auto &v: vpr) {
        swap(v.first,v.second);
    }
    sort(all(vpr));

    hsh.insert(hmp[mp(vpr[0].second,vpr[0].first)]);
    hsh.insert(hmp[mp(vpr[1].second,vpr[1].first)]);
    hsh.insert(hmp[mp(vpr[n-1].second,vpr[n-1].first)]);
    hsh.insert(hmp[mp(vpr[n-2].second,vpr[n-2].first)]);
    for (auto &v: vpr) {
        swap(v.first,v.second);
    }
    vii vrr;
    for (auto v: vpr) {
        if (hsh.count(hmp[v]))
            vrr.pb(v);
    }

    for (int i = 0; i < len(vrr); ++i) {
        for (int j = i+1; j < len(vrr); ++j) {
            vr.pb(max(abs(vrr[i].first-vrr[j].first), 
                    abs(vrr[i].second-vrr[j].second)));
        }
    }
    sort(all(vr));
    cout<<vr[len(vr)-2];

}
void sol () {
    //test
    //cout << setprecision(15) << fixed;
}

int main () {
    int testcases = 1;
    for (int t = 0; t < testcases; ++t) {
        solve();
    }

    return 0;
}

