// Arup Guha
// 3/5/2020
// Solution to 2020 February USACO Bronze Problem: Triangles

import java.util.*;
import java.io.*;

public class triangles_bronze {

	public static void main(String[] args) throws Exception {
		
		// Set up file.
		Scanner stdin = new Scanner(new File("triangles.in"));
		
		// Set up arrays.
		int n = stdin.nextInt();
		int[] x = new int[n];
		int[] y = new int[n];
		
		// Read in points.
		for (int i=0; i<n; i++) {
			x[i] = stdin.nextInt();
			y[i] = stdin.nextInt();
		}
		
		int res = 0;
		
		// Loops through all ordered triplets (i,j,k) where i,j,k are distinct.
		for (int i=0; i<n; i++) {
			for (int j=0; j<n; j++) {
				if (i == j) continue;
				for (int k=0; k<n; k++) {
					if (k == i || k == j) continue;
					
					// Not vertical
					if (x[i] != x[j]) continue;
					
					// Not horizontal
					if (y[i] != y[k]) continue;
					
					// See if this gets a better answer.
					res = Math.max(res, Math.abs(x[k]-x[i])*Math.abs(y[j]-y[i]));
				}
			}
		}

		// Output to file.
		PrintWriter out = new PrintWriter(new FileWriter("triangles.out"));
		out.println(res);
		out.close();		
		stdin.close();
	}
}