
#include <iostream>
#include <climits>
#include <stack>
using namespace std;

int N;
pair<int, int>* arr;
int ans = 0;
void input(){
    cin >> N;
    arr = new pair<int, int>[N];

    for(int i = 0; i < N; i++){
        cin >> arr[i].first >> arr[i].second;
    }

}
void solve(){

    for(int i = 0; i < N - 1; i++){
        for(int j = i + 1; j < N; j ++){
            if(arr[i].first == arr[j].first || arr[i].second == arr[j].second){
                int path = (arr[i].first - arr[j].first) + (arr[i].second - arr[j].second);
                if(path < 0) path = -path;
                if(path > ans){
                    ans = path;
                }
            }
        }
    }
}

void output(){
    cout << ans << endl;
}

int main()
{
    input();
    solve();
    output();
    return 0;
}
