//#include "bits/stdc++.h"

#define _USE_MATH_DEFINES

#include <iostream>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <functional>
#include <utility>
#include <tuple>
#include <vector>
#include <string>
#include <list>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <queue>
#include <deque>
#include <stack>
#include <iterator>
#include <bitset>
#include <complex>
#include <limits>
#include <random>


using namespace std;

#define rep(i,a,b) for(int i=(a), i##_len=(b);i<i##_len;i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)

#define int ll
#define SZ(x) ((int)(x).size())
#define pb push_back
#define mp make_pair

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<double, double> pdd;
typedef vector< vector<int> > mat;

template<class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return true; } return false; }

const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)1e9 + 7;

const double EPS = 1e-9;

class V2
{
public:
	int x;
	int y;
public:
	V2() :x(0), y(0) {}
	V2(const V2& v) :x(v.x), y(v.y) {}
	V2(int x, int y) :x(x), y(y) {}

	V2& operator = (const V2& v)
	{
		x = v.x;
		y = v.y;
		return *this;
	}
	bool operator == (const V2& v) const
	{
		return (x == v.x && y == v.y);
	}
	bool operator != (const V2& v) const
	{
		return (x != v.x || y != v.y);
	}
	const V2& operator+() const
	{
		return *this;
	}
	V2& operator+()
	{
		return *this;
	}
	V2 operator-() const
	{
		return V2(-x, -y);
	}
	V2& operator+=(const V2& v)
	{
		x += v.x;
		y += v.y;
		return *this;
	}
	V2 operator+(const V2& v) const
	{
		return V2(x + v.x, y + v.y);
	}
	V2& operator+(V2&& v) const
	{
		return v += *this;
	}
	V2& operator-=(const V2& v)
	{
		x -= v.x;
		y -= v.y;
		return *this;
	}
	V2 operator-(const V2& v) const
	{
		return V2(x - v.x, y - v.y);
	}
	V2& operator-(V2&& v) const
	{
		v.x = -v.x;
		v.y = -v.y;
		v += *this;
		return v;
	}
	V2& operator*=(int k)
	{
		x *= k;
		y *= k;
		return *this;
	}
	V2 operator*(int k) const
	{
		return V2(x * k, y * k);
	}
	V2& operator/=(int k)
	{
		x /= k;
		y /= k;
		return *this;
	}
	V2 operator/(int k) const
	{
		return V2(x / k, y / k);
	}
	int operator*(const V2& v) const
	{
		return (x * v.x) + (y * v.y);
	}
	int operator/(const V2& v) const
	{
		return (x * v.y) - (y * v.x);
	}
	bool operator<(const V2& v)const
	{
		return x != v.x ? x < v.x : y < v.y;
	}

	int length()
	{
		return x + y;
	}
	int length2()
	{
		return x + y;
	}

	double dot(const V2& v)const
	{
		return x * v.x + y * v.y;
	}
	double cross(const V2& v)const
	{
		return x * v.y - y * v.x;
	}
};

int ccw(V2 a, V2 b, V2 c) {
	b -= a; c -= a;
	if (b.cross(c) > 0)   return +1;       // counter clockwise
	if (b.cross(c) < 0)   return -1;       // clockwise
	if (b.dot(c) < 0)     return +2;       // c--a--b on line
	if (b.length2() < c.length2()) return -2;       // a--b--c on line
	return 0;
}

vector<V2> convex_hull(const vector<V2>& PV)
{
	vector<V2> points = PV;
	int n = points.size(), k = 0;
	sort(points.begin(), points.end(), [](const V2& a, const V2& b) {return a.y != b.y ? a.y < b.y : a.x < b.x; });
	vector<V2> ch(2 * n);
	for (int i = 0; i < n; ch[k++] = points[i++]) // lower-hull
	{
		while (k >= 2)
		{
			int state = ccw(ch[k - 2], ch[k - 1], points[i]);
			if (state > 0 || state < -1)
			{
				break;
			}
			--k;
		}
	}
	for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = points[i--]) // upper-hull
	{
		while (k >= t)
		{
			int state = ccw(ch[k - 2], ch[k - 1], points[i]);
			if (state > 0 || state < -1)
			{
				break;
			}
			--k;
		}
	}
	ch.resize(k - 1);
	return ch;
}

int farthest(const vector<V2>& v) {
	int n = v.size();

	int si = 0, sj = 0;
	rep(t, 0, n){
		if (v[t].y < v[si].y)
			si = t;
		if (v[t].y > v[sj].y)
			sj = t;
	}

	int res = 0;
	int i = si, j = sj;
	do {
		chmax(res, abs(v[i].x - v[j].x) + abs(v[i].y - v[j].y));
		V2 di = v[(i + 1) % n] - v[i];
		V2 dj = v[(j + 1) % n] - v[j];
		if (di.cross(dj) >= 0)
			j = (j + 1) % n;
		else
			i = (i + 1) % n;
	} while (!(i == si && j == sj));

	return res;
}

signed main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	int N;
	cin >> N;

	vector<V2> P(N);
	rep(i, 0, N)cin >> P[i].x >> P[i].y;

	auto res = convex_hull(P);

	cout << farthest(res) << endl;

	return 0;
}


Measured memory_bytes: 15868