#!/usr/bin/env python3
n = int(input())

left = []
right = []
for i in range(n):
    t,x = [int(i) for i in input().split()]
    left.append((t,x-t))
    right.append((t,-x-t))
left.sort()
right.sort()

min_left = 10**18
min_right = 10**18
width = 0
for t,a in left:
    min_left = min(min_left, a)
    width = max(width, a - min_left)
for t,a in right:
    min_right = min(min_right, a)
    width = max(width, -(min_right - a))
print(width)
