import math
n = int(input())
res = math.inf

def dist(x1, y1, x2, y2):
    return math.sqrt(pow(x1-x2, 2) + pow(y1-y2, 2))

for i in range(int(n/4)):
    x1, y1 = [int(a) for a in input().split()]
    x2, y2 = [int(a) for a in input().split()]
    x3, y3 = [int(a) for a in input().split()]
    x4, y4 = [int(a) for a in input().split()]

    arr = [dist(x1, y1, x2, y2), dist(x1, y1, x3, y3),
        dist(x1, y1, x4, y4), dist(x2, y2, x3, y3),
        dist(x2, y2, x4, y4), dist(x3, y3, x4, y4)]
    
    arr = sorted(arr)
    res = min(res, arr[0]*arr[3])

print(round(res))
