#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template<class T> using vc = vector<T>;
template<class T> using vvc = vc<vc<T>>;
template<class T> using vvvc = vc<vvc<T>>;
template<class T> using vvvvc = vvc<vvc<T>>;
template<class T> using PQ = priority_queue<T>;
template<class T> using invPQ = priority_queue<T, vector<T>, greater<T>>;
using IP = pair<int, int>;
using LP = pair<ll, ll>;
#define all(x) begin(x), end(x)
#define rep(i, n) for (int i = 0; (i) < (int)(n); i++)
#define rep3(i, m, n) for (int i = (m); (i) < (int)(n); i++)
#define repr(i, n) for (int i = (n) - 1; (i) >= 0; i--)
#define rep3r(i, m, n) for (int i = (n) - 1; (i) >= (int)(m); i--)
template<class T> inline bool chmax(T & a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T & a, T b) { if (a > b) { a = b; return 1; } return 0; }

int N;
vc<int> x, y;

int chedis(int &n1, int &n2) {
    return max(abs(x[n1] - x[n2]), abs(y[n1] - y[n2]));
}

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

    int N;
    cin >> N;
    x.resize(N); y.resize(N);
    rep (i, N) cin >> x[i] >> y[i];

    vc<int> x2(N), y2(N);
    rep (i, N) x2[i] = i;
    rep (i, N) y2[i] = i;
    
    sort(all(x2), [](int &n1, int &n2) {
        return x[n1] < x[n2];
    });
    sort(all(y2), [](int &n1, int &n2) {
        return y[n1] < y[n2];
    });

    vc<IP> array;
    array.push_back({min(x2[0], x2[N-1]), max(x2[0], x2[N-1])});
    array.push_back({min(x2[0], x2[N-2]), max(x2[0], x2[N-2])});
    array.push_back({min(x2[1], x2[N-1]), max(x2[1], x2[N-1])});
    array.push_back({min(y2[0], y2[N-1]), max(y2[0], y2[N-1])});
    array.push_back({min(y2[0], y2[N-2]), max(y2[0], y2[N-2])});
    array.push_back({min(y2[1], y2[N-1]), max(y2[1], y2[N-1])});

    sort(all(array), [](IP &p1, IP &p2) {
        return chedis(p1.first, p1.second) > chedis(p2.first, p2.second);
    });
    
    if (array[0] == array[1]) cout << chedis(array[2].first, array[2].second) << endl;
    else cout << chedis(array[1].first, array[1].second) << endl;
}
#include<bits/stdc++.h>

using namespace std;
int b[2000000] = {0};
struct node{
	int x, y, id;
};
node a[200010];
bool cmp1(node x, node y) {
	return x.x < y.x;
}
bool cmp2(node x, node y) {
	return x.y < y.y;
}
int main() {
	int n;
	scanf("%d", &n);
	for (int i = 1; i <= n; i++) {
		scanf("%d%d", &a[i].x, &a[i].y);
		a[i].id = i;
	}
	int tot = 0;
	sort(a+1, a+1+n, cmp1);
	for (int i = 1; i <= n; i++) {
		if (i < n && abs(a[i].x-a[n].x)>abs((a[i].y-a[n].y))) {
			b[tot++] = abs(a[i].x-a[n].x);
		}
		if (i < n-1 && abs(a[i].x-a[n-1].x)>abs((a[i].y-a[n-1].y))) {
			b[tot++] = abs(a[i].x-a[n-1].x);
		}
	}
	sort(a+1, a+1+n, cmp2);
	for (int i = 1; i <= n; i++) {
		if (i < n && abs(a[i].y-a[n].y) >= abs((a[i].x-a[n].x))) {
			b[tot++] = abs(a[i].y-a[n].y);
		}
		if (i < n-1 && abs(a[i].y-a[n-1].y) >= abs((a[i].x-a[n-1].x))) {
			b[tot++] = abs(a[i].y-a[n-1].y);
		}
	}
	sort(b,b+tot);
	printf("%d\n", b[tot-2]);
	return 0;
}