#include<iostream>
#include<cmath>
using namespace std;
int main () {
    int n, best = 0;
    cin >> n;
    pair<int, int> points[n];
    for (int i = 0; i < n; i++) {
        cin >> points[i].first >> points[i].second;
        for (int j = 0; j < i; j++) {
            if (points[i].first == points[j].first) {
                if (abs(points[i].second - points[j].second) > best) {
                    best = abs(points[i].second - points[j].second);
                }
            }
            if (points[i].second == points[j].second) {
                if (abs(points[i].first - points[j].first) > best) {
                    best = abs(points[i].first - points[j].first);
                }
            }
        }
    }
    cout << best;
    return 0;
}