// Arup Guha
// 5/18/2016
// Solution to USACO 2016 Silver April Problem: Field Reduction

import java.util.*;
import java.io.*;

public class reduce {

	public static void main(String[] args) throws Exception {

		// Read in data.
		BufferedReader stdin = new BufferedReader(new FileReader("reduce.in"));
		StringTokenizer tok = new StringTokenizer(stdin.readLine());
		int n = Integer.parseInt(tok.nextToken());

        // Reading in the points - will sort 2 ways.
        pt[] pts = new pt[n];
        for (int i=0; i<n; i++) {
            tok = new StringTokenizer(stdin.readLine());
            int x = Integer.parseInt(tok.nextToken());
            int y = Integer.parseInt(tok.nextToken());
            pts[i] = new pt(x,y);
        }

		// Sort the data by x.
		Arrays.sort(pts);
		for (int i=0; i<3; i++)
			pts[i].canRemove = true;
		for (int i=n-3; i<n; i++)
			pts[i].canRemove = true;

		// Now sort in y.
		Arrays.sort(pts, new ptCmpY());
		for (int i=0; i<3; i++)
			pts[i].canRemove = true;
		for (int i=n-3; i<n; i++)
			pts[i].canRemove = true;

		// Get a complete list of all items that are removable.
		ArrayList<Integer> removable = new ArrayList<Integer>();
		for (int i=0; i<n; i++)
			if (pts[i].canRemove)
				removable.add(i);

		// Bigger than any possible answer given their bounds.
		int res = 2000000000;

		// Being lazy again. I know this is fast enough...
		for (int mask=0; mask<(1<<(removable.size())); mask++) {

			// Only care about subsets of size 3...
			if (Integer.bitCount(mask) != 3) continue;

			// Add these three bits.
			ArrayList<Integer> exclude = new ArrayList<Integer>();
			for (int i=0; i<removable.size(); i++)
				if ((mask & (1<<i)) > 0)
					exclude.add(removable.get(i));

			// We try excluding these three pts, update if it improves our answer.
			res = Math.min(res, area(pts, exclude));
		}

		// Write result.
		PrintWriter out = new PrintWriter(new FileWriter("reduce.out"));
		out.println(res);
		out.close();
		stdin.close();
	}

    // Returns the area enclosing pts excluding pt pts[exclude].
	public static int area(pt[] pts, ArrayList<Integer> exclude) {

        int minX = 100000, maxX = 0;
        int minY = 100000, maxY = 0;

        // Go through all pts but the excluded one.
        for (int i=0; i<pts.length; i++) {
            if (exclude.contains(i)) continue;
            minX = Math.min(minX, pts[i].x);
            maxX = Math.max(maxX, pts[i].x);
            minY = Math.min(minY, pts[i].y);
            maxY = Math.max(maxY, pts[i].y);
        }

        // Here is our box.
        return (maxX-minX)*(maxY-minY);
	}
}

class pt implements Comparable<pt> {

    public int x;
    public int y;
	public boolean canRemove;

    public pt(int myx, int myy) {
        x = myx;
        y = myy;
    	canRemove = false;
    }

    public int compareTo(pt other) {
        return this.x - other.x;
    }
}

class ptCmpY implements Comparator<pt> {
	public int compare(pt a, pt b) {
		return a.y - b.y;
	}
}
