#include<bits/stdc++.h>
using namespace std;
#define reg register
typedef long long ll;
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
static char buf[1<<21],*p1=buf,*p2=buf;
inline int read(void){
	reg bool f=false;
	reg char ch=getchar();
	reg int res=0;
	while(!isdigit(ch))f|=(ch=='-'),ch=getchar();
	while(isdigit(ch))res=10*res+(ch^'0'),ch=getchar();
	return f?-res:res;
}

const int MAXN=2e5+5;

struct Point{
	int x,y;
};

int n;
Point a[MAXN];

int main(void){
	n=read();
	for(reg int i=1;i<=n;++i)
		a[i].x=read(),a[i].y=read();
	reg int Maxx=1,Maxy=1,Minx=1,Miny=1;
	for(reg int i=1;i<=n;++i){
		if(a[i].x>a[Maxx].x)
			Maxx=i;
		if(a[i].y>a[Maxy].y)
			Maxy=i;
		if(a[i].x<a[Minx].x)
			Minx=i;
		if(a[i].y<a[Miny].y)
			Miny=i;
	}
	set<int> S={Maxx,Maxy,Minx,Miny};
	set<pair<int,int> > T;
	vector<int> ans;
	for(auto j:S)
		for(int i=1;i<=n;++i)
			if(!T.count(make_pair(i,j))){
				ans.push_back(max(abs(a[j].x-a[i].x),abs(a[j].y-a[i].y)));
				T.insert(make_pair(i,j)),T.insert(make_pair(j,i));
			}
	sort(ans.begin(),ans.end());
	reverse(ans.begin(),ans.end());
	printf("%d\n",ans[1]);
	return 0;
}
#include <bits/stdc++.h>
#define sz(c) int(c.size())
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define per(i, a, b) for (int i = (b)-1; i >= (a); --i)
using namespace std;
using ll = long long;

#ifdef LOCAL
#include <local/debug.h>
#else
#define debug(...) (void)0
#endif

const int inf = (int)1e9 + 1;

int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);

  int n;
  cin >> n;
  vector<int> x(n), y(n);
  rep(i, 0, n) cin >> x[i] >> y[i];

  vector<bool> ex(n);
  auto find_max = [&](auto &a) {
    pair<int, int> min_prev{inf, -1};
    tuple<int, int, int> best{-inf, -1, -1};
    rep(i, 0, n) if (!ex[i]) {
      if (min_prev.second != -1) {
        best = max(best, make_tuple(a[i] - min_prev.first, min_prev.second, i));
      }
      min_prev = min(min_prev, make_pair(a[i], i));
    }

    pair<int, int> max_prev{-inf, -1};
    rep(i, 0, n) if (!ex[i]) {
      if (max_prev.second != -1) {
        best = max(best, make_tuple(max_prev.first - a[i], max_prev.second, i));
      }
      max_prev = max(max_prev, make_pair(a[i], i));
    }
    return best;
  };

  auto max_x = find_max(x);
  auto max_y = find_max(y);

  if (get<0>(max_x) == get<0>(max_y) && max_x != max_y) {
    cout << get<0>(max_x) << "\n";
    return 0;
  }

  debug(max_x);
  debug(max_y);

  auto max = std::max(max_x, max_y);

  set<int> s;
  s.insert(get<1>(max));
  s.insert(get<2>(max));

  int res = -inf;
  for (int i : s) {
    ex[i] = true;
    res = std::max(res, get<0>(find_max(x)));
    res = std::max(res, get<0>(find_max(y)));
    debug(i, get<0>(find_max(x)), get<0>(find_max(y)));
    ex[i] = false;
  }
  cout << res << "\n";
}
