n = int(input())
ans = 40000*40000 # min으로 비교하면서 저장하자

pt_x = []
pt_y = []
for i in range(n):
    
    cur_x, cur_y = map(int,input().split())
    pt_x.append(cur_x)
    pt_y.append(cur_y)


for i in range(n):
    ar = 0
    tmp_x = []
    tmp_y = []
    for j in range(n):
        if j == i:
            continue
        else:
            tmp_x.append(pt_x[j])
            tmp_y.append(pt_y[j])
            
    dx = max(tmp_x) - min(tmp_x)
    dy = max(tmp_y) - min(tmp_y)
    ar = dx*dy
    
    ans = min(ans,ar)

print(ans)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: