def scalar(a, b):
    return a[0] * b[0] + a[1] * b[1]

def get_sq(a, b):
    return int((a[0]**2 + a[1]**2) ** 0.5 * (b[0]**2 + b[1]**2) ** 0.5)

def get_vec(a, b):
    return [a[0] - b[0], a[1] - b[1]]

def find_point(x, u, v):
    return [x[0] + u[0] + v[0], x[1] + u[1] + v[1]]

def main():
    n = int(input())
    points = []
    sq = -1
    for i in range(n):
        point = list(map(int, input().split()))
        points.append(point)

    points = sorted(points)  
    # print(points)
    while(len(points) > 4):
        points = points[1:-1]

    a = get_vec(points[0], points[1])
    b = get_vec(points[0], points[2])
    c = get_vec(points[0], points[3])
    if scalar(a,b) == 0:
        print(get_sq(a,b))
        return
    print(get_sq(a,c))
main()
