import math



class Point:
    def __init__(self, x, y) -> None:
        self.x = x
        self.y = y
        self.valid = True

    def get_x(self):
        return self.x
    def get_y(self):
        return self.y
    def is_valid(self):
        return self.valid
    
    def __repr__(self) -> str:
        return str((self.x, self.y, self.valid))
    
    def dist(self, other):
        return math.sqrt((self.x - other.x) ** 2 + (self.y - other.y)**2)
        





############################################
############################################
############################################
############################################

N = int(input())

pnts = [Point(*map(int, input().split())) for _ in range(N)]

x_pnts = sorted(pnts, key=Point.get_x)
y_pnts = sorted(pnts, key=Point.get_y)

# print(x_pnts)
# print(y_pnts)

x_min_i = 0
x_max_i = N - 1
y_min_i = 0
y_max_i = N - 1

for _ in range((N // 4) - 1):
    while not x_pnts[x_min_i].valid:
        x_min_i += 1
    while not x_pnts[x_max_i].valid:
        x_max_i -= 1
    while not y_pnts[y_min_i].valid:
        y_min_i += 1
    while not y_pnts[y_max_i].valid:
        y_max_i -= 1
    
    x_min = x_pnts[x_min_i].x
    x_max = x_pnts[x_max_i].x

    # print(x_pnts)
    # print(y_pnts)

    if x_min == x_pnts[x_min_i + 1].x:
        x_pnts[x_min_i].valid = False
        x_pnts[x_min_i + 1].valid = False
        x_pnts[x_max_i].valid = False
        x_pnts[x_max_i - 1].valid = False
    else:
        x_pnts[x_min_i].valid = False
        x_pnts[x_max_i].valid = False
        y_pnts[y_min_i].valid = False
        y_pnts[y_max_i].valid = False

rect = list(filter(Point.is_valid, pnts))

dists = [
    rect[0].dist(rect[1]),
    rect[0].dist(rect[2]),
    rect[0].dist(rect[3]),
]

dists.sort()


print(int(round(dists[0]*dists[1])))
    
