func readInt() -> Int {
    return Int(readLine()!)!
}

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readTwoInts() -> (a: Int, b: Int) {
    let ints = readLine()!.split(separator: " ").map { Int($0)! }
    return (a: ints[0], b: ints[1])
}

func main1() {
    let n = readInt()
    var ans = 0
    
    var leftUp = readInts()
    var rightDown = leftUp
    var rightUp = leftUp
    var leftDown = leftUp
    
    for _ in 2...n {
        let inArr = readInts()
        
        if inArr[0] < leftUp[0] && inArr[1] < leftUp[1] {
            leftUp = inArr
            break
        }
        if inArr[0] > rightUp[0] && inArr[1] < rightUp[1] {
            rightUp = inArr
            break
        }
        if inArr[0] < leftDown[0] && inArr[1] > leftDown[1] {
            leftUp = inArr
            break
        }
        if inArr[0] > rightDown[0] && inArr[1] > rightDown[1] {
            leftUp = inArr
            break
        }
    }
    
    var x1 = leftUp[0] - rightDown[0]
    var y1 = leftUp[1] - rightDown[1]
    x1 = x1 < 0 ? -x1 : x1
    y1 = y1 < 0 ? -y1 : y1
    let sum1 = x1 + y1
    
    var x2 = rightUp[0] - leftDown[0]
    var y2 = rightUp[1] - leftDown[1]
    x2 = x2 < 0 ? -x2 : x2
    y2 = y2 < 0 ? -y2 : y2
    let sum2 = x2 + y1
    
    ans = sum1 < sum2 ? sum2 : sum1
    
    print(ans)
    
}

main1()