#include <bits/stdc++.h>
using namespace std;
int GLL(long long& x) { return scanf("%lld", &x); }
int GI(int& x) { return scanf("%d", &x); }
int n;
int xy[100000][2];
int main() {
  GI(n);
  for (int i = 0; i < (int)(n); i++) {
    GI(xy[i][0]);
    GI(xy[i][1]);
  }
  int minidx = 0;
  int maxidx = 0;
  for (int i = 0; i < (int)(n); i++) {
    if (xy[i][0] < xy[minidx][0]) {
      minidx = i;
    }
    if (xy[i][0] > xy[maxidx][0]) {
      maxidx = i;
    }
  }
  long long cost = min(abs(xy[maxidx][0] - xy[minidx][0]),
                       abs(xy[maxidx][1] - xy[minidx][1]));
  minidx = 0;
  maxidx = 0;
  for (int i = 0; i < (int)(n); i++) {
    if (xy[i][1] < xy[minidx][1]) {
      minidx = i;
    }
    if (xy[i][1] > xy[maxidx][1]) {
      maxidx = i;
    }
  }
  long long cost2 = min(abs(xy[maxidx][0] - xy[minidx][0]),
                        abs(xy[maxidx][1] - xy[minidx][1]));
  printf("%lld\n", max(cost, cost2));
  return 0;
}
