//Aditya_14

#include <bits/stdc++.h>
#define int long long
#define loop(a, b, c) for(int a=b; a<c; a++)
#define rev(a, b) for(int a=b-1; a>=0; a--)
#define fo(a, b) for(int a=0; a<b; a++)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define vi vector<int>
#define vvi vector<vi>
#define vii vector<pair<int, int>>
#define bs binary_search
#define pii pair<int, int>
#define mem(a, b) memset(a, b, sizeof(a))
#define ff first
#define ss second
#define mii map<int, int>
#define chmax(a, b) a=max(a, b)
#define chmin(a, b) a=min(a, b)
const int mod=1000000007;
const int maxn=1e18+7;
using namespace std;

int power(int b,int p)
{
	b %= mod;

	int ans = 1;

	while(p > 0)
	{
		if (p%2 == 1)
		{
			ans *= b;
			ans %= mod;
		}

		b *= b;
		b %= mod;
		p /= 2;
	}

	return ans;
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int t=1;
    //cin >> t;
    while(t--)
    {
        int n;
        cin >> n;
        vii x(n);
        vii y(n);
        fo(i, n)
        {
            cin >> x[i].first;
            cin >> y[i].first;
            x[i].ss=i;
            y[i].ss=i;
        }
        sort(all(x));
        sort(all(y));
        int a=x[n-1].ff-x[0].ff;
        int b=y[n-1].ff-y[0].ff;
        int ans=0;
        //cout << a << x[n-1].ss << x[0].ss << b << y[n-1].ss << y[0].ss << " ";
        if(((x[n-1].ss!=y[n-1].ss) || (x[n-1].ss!=y[0].ss)) && ((x[0].ss!=y[n-1].ss) || (x[0].ss!=y[0].ss)))
        {
            if(a!=b) ans=min(a, b);
        }
            int c, d, e, f;
            c=x[n-2].ff-x[0].ff;
            d=x[n-1].ff-x[1].ff;
            e=y[n-1].ff-y[1].ff;
            f=y[n-2].ff-y[0].ff;
            ans=max({ans, c, d, e, f});
            cout << ans;
    }
    return 0;
}

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

int main() {
  int n;
  cin >> n;
  
  vector<int> x(n), y(n);
  for (int i = 0; i < n; i++) cin >> x.at(i) >> y.at(i);
  
  if (n == 3) {
    vector<int> ans;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j < n; j++) {
        ans.emplace_back(max(abs(x[i] - x[j]), abs(y[i] - y[j])));
      }
    }
    sort(ans.rbegin(), ans.rend());
    cout << ans.at(1) << '\n';
    return 0;
  }
  
  vector<pair<int, int>> x2(n), y2(n);
  for (int i = 0; i < n; i++) {
    x2.at(i) = make_pair(x.at(i), i);
    y2.at(i) = make_pair(y.at(i), i);
  }
  
  sort(x2.begin(), x2.end());
  sort(y2.begin(), y2.end());
  
  set<int> st;
  for (auto i : {0, 1, n - 1, n - 2}) {
    st.insert(x2.at(i).second);
    st.insert(y2.at(i).second);
  }
  
  vector<int> ans;
  for (auto it = st.begin(); it != st.end(); it++) {
    for (auto it2 = it; it2 != st.end(); it2++) {
      if (it == it2) continue;
      ans.emplace_back(max(abs(x[*it] - x[*it2]), abs(y[*it] - y[*it2])));
    }
  }
  
  sort(ans.rbegin(), ans.rend());
  cout << ans.at(1) << '\n';
}