#pragma GCC optimize ("O2")
#pragma GCC target ("avx")
//#include<bits/stdc++.h>
//#include<atcoder/all>
//using namespace atcoder;
#include<iostream>
#include<cstring>
#include<algorithm>

using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const int CM = 1 << 17, CL = 12;
char cn[CM + CL], * ci = cn + CM + CL, * owa = cn + CM, ct;
const ll ma0 = 1157442765409226768;
const ll ma1 = 1085102592571150095;
const ll ma2 = 71777214294589695;
const ll ma3 = 281470681808895;
const ll ma4 = 4294967295;
inline int getint() {
	if (ci - owa > 0) {
		memcpy(cn, owa, CL);
		ci -= CM;
		fread(cn + CL, 1, CM, stdin);
	}
	int pn = 1;
	if (*ci == '-') {
		pn = -pn;
		ci++;
	}
	ll tmp = *(ll*)ci;
	if ((tmp & ma0) ^ ma0) {
		int dig = 68 - __builtin_ctzll((tmp & ma0) ^ ma0);
		tmp = tmp << dig & ma1;
		tmp = tmp * 10 + (tmp >> 8) & ma2;
		tmp = tmp * 100 + (tmp >> 16) & ma3;
		tmp = tmp * 10000 + (tmp >> 32) & ma4;
		ci += (72 - dig >> 3);
	}
	else {
		tmp = tmp & ma1;
		tmp = tmp * 10 + (tmp >> 8) & ma2;
		tmp = tmp * 100 + (tmp >> 16) & ma3;
		tmp = tmp * 10000 + (tmp >> 32) & ma4;
		ci += 8;
		if ((ct = *ci++) >= '0') {
			tmp = tmp * 10 + ct - '0';
			if (*ci++ == '0') {
				tmp = tmp * 10;
				ci++;
			}
		}
	}
	return pn * tmp;
}
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	int N = getint();
	int k1, k2, x1 = -1e9, x2 = -1e9, y1, y2;
	int k3, k4, x3 = 1e9, x4 = 1e9, y3, y4;
	int k5, k6, x5, x6, y5 = -1e9, y6 = -1e9;
	int k7, k8, x7, x8, y7 = 1e9, y8 = 1e9;
	rep(i, N) {
		int x = getint(), y = getint();
		if (x2 < x) {
			k2 = i;
			x2 = x;
			y2 = y;
			if (x1 < x2) {
				swap(k1, k2);
				swap(x1, x2);
				swap(y1, y2);
			}
		}
		if (x4 > x) {
			k4 = i;
			x4 = x;
			y4 = y;
			if (x3 > x4) {
				swap(k3, k4);
				swap(x3, x4);
				swap(y3, y4);
			}
		}
		if (y6 < y) {
			k6 = i;
			x6 = x;
			y6 = y;
			if (y5 < y6) {
				swap(k5, k6);
				swap(x5, x6);
				swap(y5, y6);
			}
		}
		if (y8 > y) {
			k8 = i;
			x8 = x;
			y8 = y;
			if (y7 > y8) {
				swap(k7, k8);
				swap(x7, x8);
				swap(y7, y8);
			}
		}
	}
	pair<int, ll> list[8];
	list[0] = { -x3 + x1, ll(k3 | k1) << 32 | (k3 & k1) };
	list[1] = { -x4 + x1, ll(k4 | k1) << 32 | (k4 & k1) };
	list[2] = { -x3 + x2, ll(k3 | k2) << 32 | (k3 & k2) };
	list[3] = { -x4 + x2, ll(k4 | k2) << 32 | (k4 & k2) };
	list[4] = { -y7 + y5, ll(k7 | k5) << 32 | (k7 & k5) };
	list[5] = { -y8 + y5, ll(k8 | k5) << 32 | (k8 & k5) };
	list[6] = { -y7 + y6, ll(k7 | k6) << 32 | (k7 & k6) };
	list[7] = { -y8 + y6, ll(k8 | k6) << 32 | (k8 & k6) };
	sort(list, list + 8);

	if (list[7].second == list[6].second) co(list[5].first);
	else co(list[6].first);


	Would you please return 0;
}
#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
typedef long long ll;
typedef long double ld;
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define mod 1000000007
#define pii pair<ll,ll>
#define inf 1000000000000000000
#define bpc(x) __builtin_popcountll(x)
#define autoit(x,it) for(auto it = x.begin(); it != x.end(); it++)
#define autoitr(x,it) for(auto it = x.rbegin(); it != x.rend(); it++)
#define rep(n) for(ll i = 0; i < n; i++)
#define repi(i,n) for(ll i = 0; i < n; i++)
#define hmap gp_hash_table<ll, ll>

#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 

#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> 

using namespace std;
mt19937_64 mt(chrono::steady_clock::now().time_since_epoch().count());

int main()
{
  FAST/**/
  
  ll n;
  cin>>n;
  
  pii arr[n];
  rep(n)
        cin>>arr[i].ff>>arr[i].ss;
  map<pii,ll> dis;
  vector<pii> x,y;
  rep(n)
        x.pb(mp(arr[i].ff,i)), y.pb(mp(arr[i].ss,i));
  sort(x.begin(),x.end());
  sort(y.begin(),y.end());
  for(ll i=0;i<3;i++)
  {
      for(ll j=n-1;j>=n-3;j--)
      {
          if(j != i)
          {
              ll i1 = x[i].ss, i2 = x[j].ss;
              if(i1>i2)
                    swap(i1,i2);
              dis[{i1,i2}] = max(dis[{i1,i2}], max(abs(arr[i1].ff - arr[i2].ff), abs(arr[i1].ss - arr[i2].ss))); 
          }
      }
      
      for(ll j=0;j<3;j++)
      {
          if(j != i)
          {
              ll i1 = x[i].ss, i2 = x[j].ss;
              if(i1>i2)
                    swap(i1,i2);
              //cout<<max(abs(arr[i1].ff - arr[i2].ff), abs(arr[i1].ss - arr[i2].ss))<<"\n";
              dis[{i1,i2}] = max(dis[{i1,i2}], max(abs(arr[i1].ff - arr[i2].ff), abs(arr[i1].ss - arr[i2].ss))); 
          }
      }
  }
  
  for(ll i=0;i<3;i++)
  {
      for(ll j=n-1;j>=n-3;j--)
      {
          if(j != i)
          {
              ll i1 = y[i].ss, i2 = y[j].ss;
              if(i1>i2)
                    swap(i1,i2);
              dis[{i1,i2}] = max(dis[{i1,i2}], max(abs(arr[i1].ff - arr[i2].ff), abs(arr[i1].ss - arr[i2].ss))); 
          }
      }
      
      for(ll j=0;j<3;j++)
      {
          if(j != i)
          {
              ll i1 = y[i].ss, i2 = y[j].ss;
              if(i1>i2)
                    swap(i1,i2);
              dis[{i1,i2}] = max(dis[{i1,i2}], max(abs(arr[i1].ff - arr[i2].ff), abs(arr[i1].ss - arr[i2].ss))); 
          }
      }
  }
  
  vector<ll> v;
  autoit(dis,it)
        v.pb(it->ss);// cout<<"for "<<it->ff.ff<<" , "<<it->ff.ss<<" = "<<it->ss<<'\n';
  sort(v.begin(),v.end(),greater<ll>());
  cout<<v[1]<<"\n";
    
  return 0;
}
   
   
 