#include using namespace std; typedef long long ll; typedef long double ld; typedef pair ii; typedef vector vi; typedef vector vvi; typedef vector vii; #define x first #define y second #define pb push_back #define eb emplace_back #define rep(i,a,b) for(auto i=(a); i<(b); ++i) #define REP(i,n) rep(i,0,n) #define all(v) begin(v), end(v) #define sz(v) ((int) (v).size()) #define rs resize #define DBG(x) cerr << __LINE__ << ": " \ << #x<< " = " << (x) << endl template ostream& operator<<(ostream &os, const vector &v) { os << "\n["; for(const T &x : v) os << x << ','; return os << "]\n"; } namespace std { template struct hash> { public: size_t operator()(const pair &p) const { size_t x = hash()(p.x), y = hash()(p.y); return x ^ (y + 0x9e3779b9 + (x<<6) + (x>>2)); } }; } void run() { ll n; cin >> n; ll a0 = -1'000'000'000, b0 = -1'000'000'000, a1 = 1'000'000'000, b1 = 1'000'000'000; for (ll i = 0; i < n; i++) { ll x, y; cin >> x >> y; ll a = x+y, b = x-y; a0 = max(a0, a+1); a1 = min(a1, a-1); b0 = max(b0, b+1); b1 = min(b1, b-1); } cout << abs(a0-a1) + abs(b0-b1) << endl; } signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout << fixed << setprecision(20); run(); return 0; }