# coding: utf-8
import array, bisect, collections, copy, heapq, itertools, math, random, re, string, sys, time
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
MOD = 10 ** 9 + 7


def II(): return int(input())
def ILI(): return list(map(int, input().split()))
def IAI(LINE): return [ILI() for __ in range(LINE)]
def IDI(): return {key: value for key, value in ILI()}


def read():
    N = II()
    x_y = [ILI() for __ in range(N)]
    return N, x_y


def solve(N, x_y):
    left_point = x_y[0]
    right_point = x_y[1]
    point_len = min(abs(left_point[0] - right_point[0]), abs(left_point[1] - right_point[1]))
    for i in range(2, N):
        now_point = x_y[i]
        left_len = min(abs(left_point[0] - now_point[0]), abs(left_point[1] - now_point[1]))
        right_len = min(abs(left_point[0] - now_point[0]), abs(left_point[1] - now_point[1]))
        if left_len <= point_len:
            continue
        if right_len <= point_len:
            continue
        point_len = max(left_len, right_len)
        right_point = now_point
    
    return point_len
    


def main():
    params = read()
    print(solve(*params))


if __name__ == "__main__":
    main()
