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

typedef long long ll;

typedef pair <int, int> pii;
typedef pair <ll,ll> pll;

typedef vector <int> vint;
typedef vector <ll> vll;
typedef vector <pii> vpii;
typedef vector <pll> vpll;
typedef vector <string> vs;
typedef priority_queue <int> pqi;

#define FOR(i, a, b) for(int i = a; i < (b); ++i)
#define F0R(i, a) for(int i = 0; i < (a); ++i)
#define FORd(i, a, b) for(int i = (b) - 1; i >= a; --i)
#define F0Rd(i, a) for(int i = (a) - 1; i >= 0; --i)
#define trav(x, a) for(auto& x : a)

#define pb push_back
#define mkp make_pair
#define vbb vector <bool>
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define allr(x) x.rbegin(), x.rend()

const int mod = 1000000007;
const long long inf = 1e18;
const char nl = '\n';

void solve_it(){
    vint a(3);
    F0R(i, 3) cin>>a[i];
    sort(all(a));
    cout<<a[3 - 1] + a[3 - 2];
}


int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    solve_it();
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define rep(i,x,y) for(int i=(int)(x);i<(int)(y);i++)
#define print(A,x,n) rep(i,0,n){cout<<(i ? " ":"")<<A[i]x;}cout<<endl;
#define pprint(A,y,m,n) rep(j,0,m){print(A[j],y,n);}
const long mod=1e9+7;
const int siz=3e5;
const int inf=1e9;
int main(){
	int N; cin>>N;
	pair<long,int> vx[N], vy[N];
	long x[N], y[N];
	rep(i,0,N){
		cin>>x[i]>>y[i];
		vx[i] = {x[i], i};
		vy[i] = {y[i], i};
	}
	sort(vx, vx+N); sort(vy, vy+N);
	set<int> id;
	id.insert(vx[0].second);
	id.insert(vx[1].second);
	id.insert(vx[N-2].second);
	id.insert(vx[N-1].second);
	id.insert(vy[0].second);
	id.insert(vy[1].second);
	id.insert(vy[N-2].second);
	id.insert(vy[N-1].second);

	vector<long> dist;
	for(int v:id)for(int u:id){
		dist.push_back(max(abs(x[u] - x[v]), abs(y[u] - y[v])));
	}
	sort(dist.begin(), dist.end(), greater<long>());
	cout<<dist[2]<<endl;
}