#include <iostream>
#include <algorithm>
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);

    int n;
    cin >> n;
    int x[n], y[n];
    long long minp=9000000000000000000;
    for(int i = 0; i<n; i++){
        cin >> x[i] >> y[i];
    }
    for(int i = 0; i<n; i++){
        int maxx=0, maxy=0, minx=2000000000, miny=2000000000;
        for(int j = 0; j<n; j++){
            if (i==j){continue;}
            maxx=max(maxx, x[j]);
            minx=min(minx, x[j]);
            maxy=max(maxy, y[j]);
            miny=min(miny, y[j]);

        }
        long long p = (maxx-minx)*(maxy-miny);
        for(int j = 0; j<n; j++){
            if (i==j){continue;}
            if (j==n-1){
                p-=(abs(x[0]-x[j])*abs(y[0]-y[j]))/2;
            }
            else{
                p-=(abs(x[j+1]-x[j])*abs(y[j+1]-y[j]))/2;
            }
            //cout << p << " ";
        }
        minp=min(minp, p);

    }
    cout << minp;



    return 0;
}