#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INFint = 1e9+1;
const ll INFll = (ll)1e18+1;
const int MOD=1e9+7;

int main(){
  int N;
  cin>>N;
  vector<pair<pair<ll,ll>, int>> py(N), px(N);
  for (int i = 0; i < N; i++) {
    int x, y;
    cin>>x>>y;
    py[i] = {{y, x}, i};
    px[i] = {{x, y}, i};
  }
  set<int> st;
  sort(py.begin(), py.end());
  sort(px.begin(), px.end());
  vector<pair<int,int>> kouho;
  if (st.find(py[0].second) == st.end()) {
    st.insert(py[0].second);
    kouho.push_back({py[0].first.second, py[0].first.first});
  }
  if (st.find(py[1].second) == st.end()) {
    st.insert(py[1].second);
    kouho.push_back({py[1].first.second, py[1].first.first});
  }
  if (st.find(py[N - 1].second) == st.end()) {
    st.insert(py[N - 1].second);
    kouho.push_back({py[N - 1].first.second, py[N - 1].first.first});
  }
  if (st.find(py[N - 2].second) == st.end()) {
    st.insert(py[N - 2].second);
    kouho.push_back({py[N - 2].first.second, py[N - 2].first.first});
  }
  if (st.find(px[0].second) == st.end()) {
    st.insert(px[0].second);
    kouho.push_back(px[0].first);
  }
  if (st.find(px[1].second) == st.end()) {
    st.insert(px[1].second);
    kouho.push_back(px[1].first);
  }
  if (st.find(px[N - 1].second) == st.end()) {
    st.insert(px[N - 1].second);
    kouho.push_back(px[N - 1].first);
  }
  if (st.find(px[N - 2].second) == st.end()) {
    st.insert(px[N - 2].second);
    kouho.push_back(px[N - 2].first);
  }
  vector<ll> ans;
  for (int i = 0; i < (int)kouho.size(); i++) {
    for (int j = i + 1; j < (int)kouho.size(); j++) {
      ans.push_back(max(abs(kouho[i].first - kouho[j].first), abs(kouho[i].second - kouho[j].second)));
    }
  }
  sort(ans.rbegin(), ans.rend());
  // for (int i = 0; i < (int)ans.size(); i++)  cout << ans[i] << " ";
  // cout << endl;
  cout << ans[1] << endl;
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define DONTSYNC ios_base::sync_with_stdio(false);   cin.tie(NULL); cout.tie(NULL) //dont use stdio with iostream functions //input and output are out of order now!
#define TEST unsigned long long T; cin>>T; while(T--)  //loop over each testcase
#define endl "\n"
#define fori(a,start,end) for(int a=start;a<end;a++)
#define forl(a,start,end) for(long long a=start;a<end;a++)
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
typedef long long     ll;
typedef long double   ld;
typedef pair<int,int> pii;
typedef pair<ll,ll>   pll;
typedef vector<int>   vi;
typedef vector<ll>    vl;
typedef vector<pii>   vii;
typedef vector<pll>   vll;
typedef vector<vi>    vvi;
typedef vector<vl>    vvl;
const double PI = acos(-1);

void solve(){
    /* code */
    int n; cin>>n;
    vll x(n),y(n);
    fori(i,0,n){
        cin>>x[i].fi>>y[i].fi;
        x[i].se=i; y[i].se=i;
    }
    sort(all(x)); sort(all(y));
    // vl res({abs(x[n-1]-x[0]),abs(x[n-2]-x[0]),abs(x[n-1]-x[1]),abs(y[n-1]-y[0]),abs(y[n-2]-y[0]),abs(y[n-1]-y[1])});
    vector<pair<ll,pll>> res;
    res.push_back({abs(x[n-1].fi-x[0].fi),{x[n-1].se,x[0].se}});
    res.push_back({abs(x[n-2].fi-x[0].fi),{x[n-2].se,x[0].se}});
    res.push_back({abs(x[n-1].fi-x[1].fi),{x[n-1].se,x[1].se}});
    res.push_back({abs(y[n-1].fi-y[0].fi),{y[n-1].se,y[0].se}});
    res.push_back({abs(y[n-2].fi-y[0].fi),{y[n-2].se,y[0].se}});
    res.push_back({abs(y[n-1].fi-y[1].fi),{y[n-1].se,y[1].se}});
    sort(all(res)); set<pll> ss;
    if(res[5].se.fi<res[5].se.se) ss.insert({res[5].se.fi,res[5].se.se});
    else ss.insert({res[5].se.se,res[5].se.fi});
    for(int i=5;~i;i--){
        auto [val,p]=res[i];
        if(p.fi>p.se) swap(p.fi,p.se);
        if(ss.find(p)!=ss.end()){
            continue;
        }else{
            cout<<val<<endl;
            return;
        }
    }
}

int main()
{
    DONTSYNC;
    // TEST
    solve();
    return 0;
}
