#!/usr/bin/env python3
n = int(input())
a = []
for i in range(n):
    t,x = input().split()
    a.append((int(t),int(x)))
a.sort()
left = 10**18
right = -10**18
width = 0
for t,x in a:
    left = min(left, x-t)
    right = max(right, x+t)
    width = max(width, (x-t)-left, right-(x+t))
print(width)
