#include <bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define ALL(x) x.begin(), x.end()
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
random_device rnd;
mt19937 mt(rnd());
using ll = long long;
using lld = long double;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<ll>;
using VVL = vector<VL>;
using PII = pair<int, int>;
const int IINF = 1 << 30;
const ll INF = 1ll << 60;
const ll MOD = 1000000007;

int main()
{
    int n;
    cin >> n;
    vector<pair<ll, int>> xs, ys;
    rep(i, n)
    {
        ll x, y;
        cin >> x >> y;
        xs.push_back({x, i});
        ys.push_back({y, i});
    }
    sort(ALL(xs));
    sort(ALL(ys));
    vector<pair<ll, ll>> ans;
    ans.push_back({xs[xs.size() - 1].first - xs[0].first, xs[xs.size() - 1].second * 100000ll + xs[0].second});
    ans.push_back({xs[xs.size() - 2].first - xs[0].first, xs[xs.size() - 2].second * 100000ll + xs[0].second});
    ans.push_back({xs[xs.size() - 1].first - xs[1].first, xs[xs.size() - 1].second * 100000ll + xs[1].second});

    ans.push_back({ys[ys.size() - 1].first - ys[0].first, ys[ys.size() - 1].second * 100000ll + ys[0].second});
    ans.push_back({ys[ys.size() - 2].first - ys[0].first, ys[ys.size() - 2].second * 100000ll + ys[0].second});
    ans.push_back({ys[ys.size() - 1].first - ys[1].first, ys[ys.size() - 1].second * 100000ll + ys[1].second});

    sort(ALL(ans), greater<pair<ll, ll>>());
    ll id = ans[0].second;
    rep(i, ans.size())
    {
        if (ans[i].second != id)
        {
            cout << ans[i].first << endl;
            return 0;
        }
    }
}

#include<bits/stdc++.h>
using namespace std;

#define int long long
#define double long double
#define pii pair<int, int>

const int N = 1e5 + 5;

signed main () {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  
  int n;
  cin >> n;
  vector<pii> vx, vy, v;

  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    v.push_back({x, y});
    vx.push_back({x, i});
    vy.push_back({y, i});
  }

  sort(vx.begin(), vx.end());
  sort(vy.begin(), vy.end());

  set<int> s;
  s.insert(vx[0].second);
  s.insert(vx[1].second);
  s.insert(vx[n - 1].second);
  s.insert(vx[n - 2].second);

  s.insert(vy[0].second);
  s.insert(vy[1].second);
  s.insert(vy[n - 1].second);
  s.insert(vy[n - 2].second);

  vector<int> q;

  for (auto it: s) {
    q.push_back(it);
  }

  vector<int> dist;
  for (int i = 0; i < q.size(); i++)
    for (int j = i + 1; j < q.size(); j++) {
      dist.push_back(max(
        abs(v[q[i]].first - v[q[j]].first),
        abs(v[q[i]].second - v[q[j]].second)
      ));
    }

  sort(dist.begin(), dist.end());
  dist.pop_back();

  cout << dist.back();
}